Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Spec: Parse `a.b {|(*)|}`.

  • Loading branch information...
commit d2259a84011163acc06f8374bc9c64a0cc27840d 1 parent 041d91e
@Peeja authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/ruby/language/block_spec.rb
View
6 spec/ruby/language/block_spec.rb
@@ -283,6 +283,12 @@
end
end
+ describe "taking |(*)| arguments" do
+ it "does not raise an exception when no values are yielded" do
+ @y.z { |(*)| 1 }.should == 1
+ end
+ end
+
describe "taking |*a| arguments" do
it "assigns '[]' to the argument when no values are yielded" do
@y.z { |*a| a }.should == []
Please sign in to comment.
Something went wrong with that request. Please try again.