Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4b922b0

Browse files
committedJun 2, 2015
added failing spec for lambda with optional parameter
1 parent dd0567e commit 4b922b0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
 

‎spec/ruby/core/proc/curry_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
it "raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments" do
125125
lambda { @lambda_add.curry(4) }.should raise_error(ArgumentError)
126126
lambda { lambda { true }.curry(1) }.should raise_error(ArgumentError)
127+
lambda { lambda {|a, b=nil|}.curry(5) }.should raise_error(ArgumentError)
127128
end
128129

129130
it "calls the curried proc with the arguments if _arity_ arguments have been given" do
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fails:raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments

0 commit comments

Comments
 (0)
Please sign in to comment.