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: f75b331be56d
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 25966fe5b6d2
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 24, 2015

  1. [Truffle] Make it clearer we use System.identityHashCode() in Kernel#…

    …hash.
    
    * There are no more custom hashCode() methods in RubyBasicObject and subclasses.
    eregon committed Mar 24, 2015
    Copy the full SHA
    79a7d3d View commit details
  2. Copy the full SHA
    25966fe View commit details
Original file line number Diff line number Diff line change
@@ -896,7 +896,7 @@ public int hash(boolean value) {
public int hash(RubyBasicObject self) {
// TODO(CS 8 Jan 15) we shouldn't use the Java class hierarchy like this - every class should define it's
// own @CoreMethod hash
return self.hashCode();
return System.identityHashCode(self);
}

}
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ private RubyClass metaClass(VirtualFrame frame, Object object) {
public RubyMethod bind(VirtualFrame frame, RubyUnboundMethod unboundMethod, Object object) {
notDesignedForCompilation();
RubyModule module = unboundMethod.getMethod().getDeclaringModule();
if (!module.isOnlyAModule()) {
if (module instanceof RubyClass) {
if (!ModuleOperations.assignableTo(metaClass(frame, object), module)) {
CompilerDirectives.transferToInterpreter();
if (((RubyClass) module).isSingleton()) {