From: "Simon Kröger" Date: 2006-02-13T06:42:26+09:00 Subject: Re: How to pass a function as argument in ruby? the_crazy88 wrote: > I've searched a bit about the subject, but I don't understand it. All I > want is to simply pass a function of one instance to another. In Python > this works, but in ruby not. def a(x,y) return x+y end def x(b) return b.call(3,4) end puts(x(method(:a))) # or the ruby way: def x yield 3, 4 end puts(x{|a, b| a + b}) cheers Simon