Repository navigation
correct Win32API capitalization for JRuby - #484
Conversation
JRuby 9.4.0.0 introduced a change in case sensitivity in require statements, meaning that an inclusion of `win32api` loaded Win32API.rb. With this change, the require statement needs to be updated to the correct capitalization of the filename to avoid reline failures in newer versions of JRuby.
|
Is it working with JRuby 9.3 or other versions? /cc @headius |
|
JRuby 9.3 versions seem to work fine on my system with no changes; I included some output from 9.3.9.0 working in the linked issue. |
|
I was able to build JRuby from the source and make this tweak to reline before building a JRuby complete jar. This did indeed resolve the issue described in #476, allowing an irb session to open. Unfortunately, it does suffer from the issue described in #477, but I don't believe this is related to the change. I did download the 9.3.9.0 source and try to build it with the tweak as well, but I didn't find reline in the build. Perhaps it is a new addition in 9.4.0.0? |
|
It hasn't been working for quite a long while. JRUBY 9.3.8 (jruby-jar) still requires a change in lib/reline/windows.rb line #56. |
|
I merged this. But I also wondered why JRuby need |
|
Finally jumping into this one... It appears that the .rb file has been Long term, however, we would ideally be able to move away from this special code. Perhaps the non-JRuby logic might work fine on JRuby, or perhaps require only some small changes? I do not have a Windows machine to test on at the moment. |
|
@headius Thanks to your comment. https://github.com/ruby/reline/pull/484/files#diff-f91a9b95540b46598f1f9933da9aa6899df9b4c113b26e02460ab487db4cdd32R58 is copy-and-paste logic of Win32API.rb. We can remove JRuby condition or rewrite this. |
|
@hsbt The main issue is that JRuby's |
oh, I see. |
|
We corrected the naming of this on JRuby to win32api.rb. Either solution would work but jruby-complete.jar (all-in-one ruby distro) on windows is a case-sensitive search and I feel that the normal convention of files for require are all lower case. For ordinary JRuby installations So I recommend not applying this PR since we already changed it in JRuby 9.3 and JRuby 9.4 (next releases will see this). |
|
@hsbt Perhaps so? It won't work in current versions but upcoming versions will have the renamed file. |
|
@hsbt yes please. |
JRuby 9.4.0.0 seems to have introduced a change in case sensitivity in require statements, meaning that an inclusion of
win32apithat previously loaded Win32API.rb no longer works. With this change, the require statement needs to be updated to the correct capitalization of the filename to avoid reline failures in newer versions of JRuby.This is intended to address #476. I haven't had a chance to test it myself for resolution of the JRuby problem, but will update this request once I have.
EDIT: clarify problem description and apparent cause