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

Commits on Sep 15, 2015

  1. Copy the full SHA
    e530293 View commit details
  2. Copy the full SHA
    de5c075 View commit details
Showing with 16 additions and 1 deletion.
  1. +15 −0 spec/ruby/language/super_spec.rb
  2. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/supercall/GeneralSuperCallNode.java
15 changes: 15 additions & 0 deletions spec/ruby/language/super_spec.rb
Original file line number Diff line number Diff line change
@@ -79,6 +79,21 @@ def foo
lambda {sub_zsuper.new.foo}.should raise_error(NoMethodError, /super/)
end

it "uses given block even if arguments are passed explicitly" do
c1 = Class.new do
def m
yield
end
end
c2 = Class.new(c1) do
def m(v)
super()
end
end

c2.new.m(:dump) { :value }.should == :value
end

it "calls the superclass method when in a block" do
Super::S6.new.here.should == :good
end
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ public final Object execute(VirtualFrame frame) {
if (block != null) {
blockObject = procOrNullNode.executeProcOrNull(block.execute(frame));
} else {
blockObject = null;
blockObject = RubyArguments.getBlock(frame.getArguments());
}

final Object[] argumentsArray;