You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>> Range.new(0, 1000).dup
NameError: `initialize' called twice
from org/jruby/RubyRange.java:247:in `initialize_copy'
from org/jruby/RubyKernel.java:1860:in `initialize_dup'
from org/jruby/RubyKernel.java:1898:in `dup'
JRuby 1.7.20.1:
>> Range.new(0,1000).dup
=> 0..1000
The text was updated successfully, but these errors were encountered:
…Closesjruby#3163
MRI checks if the EXCL flag is Qnil to see if the range has been initalized. This doesn't work
in Java because we use a boolean which can't have a nil value. Instead, introduce a new isInited
flag which is used to track the initialization state of the Range, which corrently permits #dup
while not permitting reinitialization of a Range.
JRuby 9k final:
JRuby 1.7.20.1:
The text was updated successfully, but these errors were encountered: