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

Issue #3324 #3327

Merged
merged 1 commit into from
Sep 15, 2015
Merged

Issue #3324 #3327

merged 1 commit into from
Sep 15, 2015

Conversation

b1tfury
Copy link
Contributor

@b1tfury b1tfury commented Sep 15, 2015

The issue was that _id2ref function was retruing nil value. I fixed it to throw a RangeError. Please correct me if I am wrong at any point.

jruby_pullrequest

@kares
Copy link
Member

kares commented Sep 15, 2015

najs, would you mind cleaning-up the commits ? git squash them into one and maybe avoid touching truffle/src/main/ruby/core/rubinius/common/object_space.rb as the truffle part is unaffected ...

@@ -114,7 +114,7 @@ public static IRubyObject id2ref(IRubyObject recv, IRubyObject id) {
return object;
} else {
runtime.getWarnings().warn("ObjectSpace is disabled; _id2ref only supports immediates, pass -X+O to enable");
return runtime.getNil();
throw recv.getRuntime().newRangeError(id+" This is not id value");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to replicate the error message exactly? It should be 0x00000000000000 is not id value, which you can probably make with String.format('%016x is not id value', id).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisseaton I will do it.

@nirvdrum
Copy link
Contributor

@bitfurry Thanks for the patch! In the future, please include the issue title or some other context in the commit message. We have a fair number of people that use the JRuby repository without constant access to GitHub. While "issue #3324" links great on GitHub site, it's far less usable from the command-line or non-GitHub mirrors.

@chrisseaton
Copy link
Contributor

The failure looks unrelated, and I'll merge now rather than pestering you about the unrelated line again.

Thanks very much for your contribution!

chrisseaton added a commit that referenced this pull request Sep 15, 2015
_id2ref should raise RangeError rather than return nil for no object found
@chrisseaton chrisseaton merged commit 772f173 into jruby:master Sep 15, 2015
@chrisseaton chrisseaton added this to the JRuby 9.0.2.0 milestone Sep 15, 2015
eregon added a commit that referenced this pull request Sep 15, 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

5 participants