From: 7stud -- Date: 2009-03-20T17:50:12+09:00 Subject: Re: Passing a named function instead of a code block? Matthias Reitinger wrote: > > puts c.collect(&method(:fib)) > Why is there a difference here: def square1(x) x*x end square2 = lambda { |x| x*x} puts [1, 2, 3].collect(&square2) puts [1, 2, 3].collect(&square1) --output:-- 1 4 9 r1test.rb:8:in `square1': wrong number of arguments (0 for 1) (ArgumentError) from r1test.rb:8 Why does ruby make you use the tortured syntax: &method(:square1) for a method vs. the easier syntax for a Proc object? -- Posted via http://www.ruby-forum.com/.