Re: yields and blocks in Rails

Charles
Thu, 08 May 2008 13:40:05 -0000

Thanks for the eyes :)
with the array output, i was tacking on a .each without even thinking
about it. Comparing the ruby code, i completely glossed over
the .each .

I appreciate it!

C.


On May 8, 3:54 am, Mark Bush
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> Charles wrote:
> >
[''a'',''b'',''c'',''d''].comb(3).each
do |element|
> >     puts element
> > end
>
> You should get a LocalJumpError with this code in Ruby, too.  Remove the
> ".each" and it should be ok.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com