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' ]
SUFFIXES = $KCODE == 'UTF8' ? [ '', 'W', 'A' ] : [ '', 'A', 'W' ]
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.
Fix version check in Win32API.rb to be >= 1.9. Fixes #1499.