Skip to content

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

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

2 participants

@bryonb07

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
Something went wrong with that request. Please try again.