Hi all,
I found a difference between JRuby and Ruby.
The following is a log on my Windows 7.
Is this a known difference between ruby version (1.9.2p312 and
1.9.3p125)?
Is class_variable_set a private method in JRuby?
C:\tmp>cat test.rb
class A; end
A.class_variable_set :@@a, 1
p A.class_variable_get :@@a
C:\tmp>ruby -v
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
C:\tmp>ruby test.rb
1
C:\tmp>jruby --1.9 -v
jruby 1.6.6 (ruby-1.9.2-p312) (2012-01-30 5673572) (Java HotSpot™
Client VM 1
.6.0_29) [Windows 7-x86-java]
C:\tmp>jruby --1.9 test.rb
NoMethodError: private method `class_variable_set’ called for A:Class
(root) at test.rb:2
ashbb