Issue #3324 #3327
Issue #3324 #3327
Conversation
najs, would you mind cleaning-up the commits ? |
@@ -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"); |
chrisseaton
Sep 15, 2015
Contributor
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)
.
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)
.
@@ -35,8 +35,7 @@ def self._id2ref(id) | |||
if find_object([:object_id, Integer(id)], ary) > 0 | |||
return ary.first | |||
end | |||
|
|||
return nil | |||
return nil |
chrisseaton
Sep 15, 2015
Contributor
This is a valid commit, but it should be separate from this PR.
This is a valid commit, but it should be separate from this PR.
bitfurry
Sep 15, 2015
Author
Contributor
Okay, I will create a seperate PR.
Okay, I will create a seperate PR.
eregon
Sep 15, 2015
Member
How is this valid?
How is this valid?
chrisseaton
Sep 15, 2015
Contributor
Hmm now you've said that yeah it doesn't make sense. Don't worry - I'll revert it.
Hmm now you've said that yeah it doesn't make sense. Don't worry - I'll revert it.
bitfurry
Sep 15, 2015
Author
Contributor
@chrisseaton do I need to revert my whole commit or you will revert this part only ?
@chrisseaton do I need to revert my whole commit or you will revert this part only ?
bitfurry
Sep 15, 2015
Author
Contributor
Thanks 👍
Thanks
@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. |
The failure looks unrelated, and I'll merge now rather than pestering you about the unrelated line again. Thanks very much for your contribution! |
_id2ref should raise RangeError rather than return nil for no object found
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.