when using jrubyc + jruby jar with 1.9 mode via JRUBY_OPTS: undefined method
`!' for false:FalseClass -
--------------------------------------------------------------------------------------------------------
Key: JRUBY-6015
URL: https://jira.codehaus.org/browse/JRUBY-6015
Project: JRuby
Issue Type: Bug
Environment: jruby 1.6.3
Reporter: Jordan Sissel
Assignee: Thomas E Enebo
Code sample, file named 'test.rb':
{noformat}
puts !false
{noformat}
All of these work:
{noformat}
% which ruby
~/.rvm/rubies/jruby-1.6.3/bin/ruby
% jruby test.rb
true
% jruby --1.9 test.rb
true
% jrubyc test.rb
% java -cp .:jruby-complete-1.6.3.jar test
true
% JRUBY_OPTS=--1.9 java -cp .:jruby-complete-1.6.3.jar test
true
{noformat}
This fails:
{noformat}
% JRUBY_OPTS=--1.9 jrubyc test.rb
% JRUBY_OPTS=--1.9 java -cp .:jruby-complete-1.6.3.jar test
Exception in thread "main" org.jruby.exceptions.RaiseException: (NoMethodError)
undefined method `!' for false:FalseClass
at test.(root)(test.rb:1)
{noformat}
This is the smallest reproducible test case I could make.
It seems that when compiling with jrubyc and using --1.9 while compiling,
something about booleans messed up (specifically '!' unary method on a
boolean). I have not tested for strangeness.
Judging from the following further experiments with the jruby jar, it seems
like 1.9 libs aren't even loaded or some other oddness is going on (speculation)
I added a 'print "Ruby: #{RUBY_VERSION}"' to the code:
{noformat}
% java -jar jruby-complete-1.6.3.jar test.rb
true
Ruby: 1.8.7
% JRUBY_OPTS=--1.9 java -jar jruby-complete-1.6.3.jar test.rb
true
Ruby: 1.8.7
{noformat}
Also strange:
{noformat}
% JRUBY_OPTS=--1.9 jrubyc test.rb
% java -cp .:jruby-complete-1.6.3.jar test
Ruby: 1.8.7
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email