Project

General

Profile

Actions

Bug #3552

closed

Map doesn't accept multiple arguments for its block converted from lambda

Bug #3552: Map doesn't accept multiple arguments for its block converted from lambda

Added by aduket (aduket aduket) over 15 years ago. Updated over 14 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
1.9.1
Backport:
[ruby-core:31137]

Description

=begin
Following raises wrong number of arguments error:

irb(main):001:0> l=lambda{|x,y| x+y}
=> #<Proc:0x2b57820@(irb):1 (lambda)>
irb(main):002:0> [[1,2],[3,4]].map(&l)
ArgumentError: wrong number of arguments (1 for 2)
from (irb):2:in map' from (irb):2 from C:/Ruby191/bin/irb:12:in '
=end

Actions

Also available in: PDF Atom