We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13f1f9f commit bb0de54Copy full SHA for bb0de54
spec/ruby/language/super_spec.rb
@@ -102,6 +102,25 @@ def m(v)
102
c2.new.m(:dump) { :value }.should == :value
103
end
104
105
+ it "uses block argument given to method when used in a block" do
106
+ c1 = Class.new do
107
+ def m
108
+ yield
109
+ end
110
111
+ c2 = Class.new(c1) do
112
+ def m(v)
113
+ ary = []
114
+ 1.times do
115
+ ary << super()
116
117
+ ary
118
119
120
+
121
+ c2.new.m(:dump) { :value }.should == [ :value ]
122
123
124
it "calls the superclass method when in a block" do
125
SuperSpecs::S6.new.here.should == :good
126
0 commit comments