Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 893d10b4b65a
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 772f173adab5
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 15, 2015

  1. [#3324] modified _id2ref to raise RangeError

    - fixes #3324 and #3327
    bitfurry committed Sep 15, 2015
    Copy the full SHA
    5fae7eb View commit details
  2. Merge pull request #3327 from bitfurry/master

    _id2ref should raise RangeError rather than return nil for no object found
    chrisseaton committed Sep 15, 2015
    Copy the full SHA
    772f173 View commit details
Showing with 913 additions and 3 deletions.
  1. +1 −1 core/src/main/java/org/jruby/RubyObjectSpace.java
  2. +911 −0 hs_err_pid364.log
  3. +1 −2 truffle/src/main/ruby/core/rubinius/common/object_space.rb
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyObjectSpace.java
Original file line number Diff line number Diff line change
@@ -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(String.format("0x%016x is not id value", longId));
}
}
}
911 changes: 911 additions & 0 deletions hs_err_pid364.log

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions truffle/src/main/ruby/core/rubinius/common/object_space.rb
Original file line number Diff line number Diff line change
@@ -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
end

def self.find_references(obj)