Skip to content

Fix RubyRange#initialize_copy mistakenly erroring on #dup'ing a range#3165

Merged
enebo merged 1 commit intojruby:masterfrom
cheald:fix_range
Jul 23, 2015
Merged

Fix RubyRange#initialize_copy mistakenly erroring on #dup'ing a range#3165
enebo merged 1 commit intojruby:masterfrom
cheald:fix_range

Conversation

@cheald
Copy link
Contributor

@cheald cheald commented Jul 22, 2015

Closes #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.

…Closes jruby#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.
@enebo enebo added the core label Jul 23, 2015
@enebo enebo added this to the JRuby 9.0.1.0 milestone Jul 23, 2015
enebo added a commit that referenced this pull request Jul 23, 2015
Fix RubyRange#initialize_copy mistakenly erroring on #dup'ing a range
@enebo enebo merged commit a3cd23d into jruby:master Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants