jruby/jruby — pull request #159 by ryenus (2012-05-06 14:36:18+00:00)
Title: Fix 6606 - Dir.entires not working with non-Unicode locales (1.9 mode only)

There're just too many places with hard-coded assumption of `UTF-8` as the default encoding.

I've attached the test source/resources and the eclipse *.launch files. Running `ant test` is also successful, no test failure.

Things hopefully someone could confirm:

1. for [directory check] [1], I replaced `runtime.getPosix().stat(file.getAbsolutePath()).isDirectory()` with direct `file.isDirectory()` call, which works but I'm not sure why the original code fails.
2. for [Java String -> Ruby String conversion] [2], I modified the [involved constructor] [3] to be encoding sensitive, this also works but I'm not sure if there's other code assume the result to be always in `UTF-8`
3. how to make `ant test` executes these tests as well? or should there be a separate test suite/target for encoding related tests?

[1]: https://github.com/ryenus/jruby/pull/new/fix-6606#L2R101 "checking for directory"
[2]: https://github.com/ryenus/jruby/pull/new/fix-6606#L4R715 "convert Java String to Ruby String"
[3]: https://github.com/ryenus/jruby/pull/new/fix-6606#L3R385 "Ruby String constructor"