Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String#crypt fails on Windows #2294

Closed
elyscape opened this issue Dec 9, 2014 · 3 comments
Closed

String#crypt fails on Windows #2294

elyscape opened this issue Dec 9, 2014 · 3 comments

Comments

@elyscape
Copy link

elyscape commented Dec 9, 2014

irb(main):001:0> 'foo'.crypt('ba')
NotImplementedError: crypt unsupported or native support failed to load
        from org/jruby/RubyString.java:2660:in `crypt'
        from (irb):1:in `evaluate'
        from org/jruby/RubyKernel.java:1107:in `eval'
        from org/jruby/RubyKernel.java:1507:in `loop'
        from org/jruby/RubyKernel.java:1270:in `catch'
        from org/jruby/RubyKernel.java:1270:in `catch'
        from jirb:13:in `(root)'

Windows doesn't offer a native libcrypt, so MRI uses its own custom implementation of the awful basic DES crypt(3). As such, it probably makes sense to fall back to the Java implementation that was used in previous versions of JRuby.

@enebo
Copy link
Member

enebo commented Dec 9, 2014

omgz...so obvious as well...

@enebo enebo added this to the JRuby 1.7.18 milestone Dec 9, 2014
@djberg96
Copy link
Contributor

What about just using the openssl lib on Windows for the implementation?

@enebo
Copy link
Member

enebo commented Dec 10, 2014

This is simple enough since we have the pure-Java implementation anyways.

@enebo enebo closed this as completed Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants