Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jul 23, 2015

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.

None yet

2 participants