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

Warning in Win32api.rb - check fails in Ruby 2.0 mode #1499

Closed
bryonb07 opened this Issue Feb 10, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@bryonb07
Copy link

bryonb07 commented Feb 10, 2014

I'm using Torquebox, with JRuby 1.7.10 currently. When starting JRuby in 2.0 mode in Windows, I get the following warning:

jruby/lib/ruby/shared/Win32API.rb:11 warning: warning: variable $KCODE is no longer effective

The check on line 7 now fails in Ruby 2.0 mode, reverting to the old code:

if RUBY_VERSION =~ /1.9/
SUFFIXES = Encoding.default_internal == Encoding::UTF_8 ? [ '', 'W', 'A' ] : [ '', 'A', 'W' ]
else
SUFFIXES = $KCODE == 'UTF8' ? [ '', 'W', 'A' ] : [ '', 'A', 'W' ]
end

The same issue can be found in jruby/samples/ffi/Win32api.rb

The check needs to be updated to work with 1.9 or newer modes.

@headius headius closed this in 18c026c Feb 20, 2014

@enebo enebo added this to the JRuby 1.7.11 milestone Feb 21, 2014

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.