From: Larry Lv Date: 2012-05-11T15:59:02+09:00 Subject: Re: syntax error, unexpected ',' , expecting ')' --00248c767e96611fb204bfbd4553 Content-Type: text/plain; charset=UTF-8 but why these codes work? def a_method(a, b) a + yield(a, b) end a_method(1, 2) { |a, b| (a + b) * 3 } On Fri, May 11, 2012 at 2:37 PM, Hans Mackowiak wrote: > use: > > yield ["Fulano,32", "lol"] > > > > yield wants only one object > > -- > Posted via http://www.ruby-forum.com/. > > -- Best Regards, *Larry Lv * --00248c767e96611fb204bfbd4553 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable but why these codes work?

def a_method(a, b)
=C2=A0 a + yield(a, = b)
end

a_method(1, 2) { |a, b| (a + b) * 3 }

On Fri, May 11, 2012 at 2:37 PM, Hans Mackowiak <list= s@ruby-forum.com> wrote:
use:

yield ["Fulano,32", "lol"]



yield wants only one object



--
Best Regard= s,

Larry Lv

--00248c767e96611fb204bfbd4553--