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

Dir.foreach does not allow encoding #2547

djberg96 opened this Issue Feb 1, 2015 · 2 comments


None yet
2 participants
Copy link

djberg96 commented Feb 1, 2015

jruby (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) Client VM 24.51-b03 on 1.7.0_51-b13 +jit [Windows 7-x86]

MRI allows Dir.foreach to accept an encoding, but it seems JRuby does not:

enc = Encoding::UTF_16LE
p Dir.foreach(Dir.pwd)
p Dir.foreach(Dir.pwd, encoding: enc) # ArgumentError with JRuby

However, see as well.


This comment has been minimized.

Copy link
Contributor Author

djberg96 commented Feb 2, 2015

Ok, it seems I didn't understand the function prototype, so I've updated the example.


This comment has been minimized.

Copy link

headius commented Feb 24, 2015

Easy one to add...marking as beginner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.