From: "Ball, Donald A Jr (Library)" Date: 2007-04-23T11:35:08+09:00 Subject: Re: [QUIZ] Morse Code (#121) ------_=_NextPart_001_01C78550.07073C17 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > That's pretty much what I did (as well as some others) but yours is > much more elegant. I didn't really think about using a block with the > recursion. Cool. Thanks. That's actually the first time I've written code that yields. = It's actually bit unclear to me as to when it's better to return results = and when it's better to yield them. I guess the best thing to do would = be to check, what is it, block_given? and either yield or collect the = results as appropriate. Do more advanced rubyists have any guidance to = offer in this regard? - donald ------_=_NextPart_001_01C78550.07073C17--