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

Projects
None yet
2 participants
@cheald
Copy link
Contributor

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.

Fix RubyRange#initialize_copy mistakenly erroring on #dup'ing a range.
…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.

@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

Merge pull request #3165 from cheald/fix_range
Fix RubyRange#initialize_copy mistakenly erroring on #dup'ing a range

@enebo enebo merged commit a3cd23d into jruby:master Jul 23, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.