diff options
Diffstat (limited to 'spec/ruby/language/yield_spec.rb')
-rw-r--r-- | spec/ruby/language/yield_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/ruby/language/yield_spec.rb b/spec/ruby/language/yield_spec.rb index 8a2aa81819..e4e8448174 100644 --- a/spec/ruby/language/yield_spec.rb +++ b/spec/ruby/language/yield_spec.rb @@ -69,12 +69,10 @@ describe "The yield call" do }.should raise_error(ArgumentError) end - ruby_bug "#12705", ""..."2.5" do - it "should not destructure an Array into multiple arguments" do - lambda { - @y.s([1, 2], &lambda { |a,b| [a,b] }) - }.should raise_error(ArgumentError) - end + it "should not destructure an Array into multiple arguments" do + lambda { + @y.s([1, 2], &lambda { |a,b| [a,b] }) + }.should raise_error(ArgumentError) end end end @@ -172,6 +170,12 @@ describe "The yield call" do end end + describe "taking a splat and a keyword argument" do + it "passes it as an array of the values and a hash" do + @y.k([1, 2]) { |*a| a }.should == [1, 2, {:b=>true}] + end + end + it "uses captured block of a block used in define_method" do @y.deep(2).should == 4 end |