Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Jun 2, 2015
1 parent 2c164e5 commit dd0567e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions spec/ruby/core/method/curry_spec.rb
Expand Up @@ -25,15 +25,7 @@ def x.foo(a,b,c); [a,b,c]; end

it "raises ArgumentError when the method requires less arguments than the given arity" do
lambda { @obj.method(:zero).curry(1) }.should raise_error(ArgumentError)

# a method with one optional param would be something like: lambda { |a,b=nil| a + (b||0) }
# which doesn't work on rubinius:
# irb(main):002:0> b = lambda { |a,b=nil| a + (b||0) }
# Error validating bytecode: more arguments than local slots
# Rubinius::Internal: invalid bytecode method
lambda { @obj.method(:one_req_one_opt).curry(3) }.should raise_error(ArgumentError)

# same as above optional param in lambda/proc
lambda { @obj.method(:two_req_one_opt_with_block).curry(4) }.should raise_error(ArgumentError)
end

Expand Down

0 comments on commit dd0567e

Please sign in to comment.