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

Commits on Aug 26, 2015

  1. Copy the full SHA
    86c5a1d View commit details
  2. return correct superclass when there's a prepended module in the hier…

    …archy
    
    fixes #3276 (spec was added to rubyspecs thus should land with next merge)
    kares committed Aug 26, 2015
    Copy the full SHA
    2008589 View commit details
Showing with 3 additions and 15 deletions.
  1. +3 −1 core/src/main/java/org/jruby/RubyClass.java
  2. +0 −14 core/src/main/java/org/jruby/javasupport/proxy/JavaProxyReflectionObject.java
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -1116,7 +1116,9 @@ public IRubyObject superclass(ThreadContext context) {
throw runtime.newTypeError("uninitialized class");
}

while (superClazz != null && superClazz.isIncluded()) superClazz = superClazz.superClass;
while (superClazz != null && (superClazz.isIncluded() || superClazz.isPrepended())) {
superClazz = superClazz.superClass;
}

return superClazz != null ? superClazz : runtime.getNil();
}
Original file line number Diff line number Diff line change
@@ -153,20 +153,6 @@ public IRubyObject is_java_proxy() {
// utility methods
//

@Deprecated
protected RubyArray buildRubyArray(IRubyObject[] elements) {
RubyArray result = getRuntime().newArray(elements.length);
for (int i = 0; i < elements.length; i++) {
result.append(elements[i]);
}
return result;
}

@Deprecated
protected RubyArray buildRubyArray(final Class<?>[] classes) {
return JavaClass.toRubyArray(getRuntime(), classes);
}

final RubyArray toRubyArray(final IRubyObject[] elements) {
return RubyArray.newArrayNoCopy(getRuntime(), elements);
}