Skip to content

Commit

Permalink
added failing spec for lambda with optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Jun 2, 2015
1 parent dd0567e commit 4b922b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/ruby/core/proc/curry_spec.rb
Expand Up @@ -124,6 +124,7 @@
it "raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments" do
lambda { @lambda_add.curry(4) }.should raise_error(ArgumentError)
lambda { lambda { true }.curry(1) }.should raise_error(ArgumentError)
lambda { lambda {|a, b=nil|}.curry(5) }.should raise_error(ArgumentError)
end

it "calls the curried proc with the arguments if _arity_ arguments have been given" do
Expand Down
1 change: 1 addition & 0 deletions spec/tags/ruby/core/proc/curry_tags.txt
@@ -0,0 +1 @@
fails:raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments

0 comments on commit 4b922b0

Please sign in to comment.