Forum: Ruby Nested iterators and their scope

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
330706f815a29c699bbad1d046352fd8?d=identicon&s=25 Eric Lecarde (holmcross)
on 2014-06-17 04:36
Attachment: code_snippet.jpg (40 KB)
I get a no method error on new_coin_a in the .each iterator. I don't
understand, doesn't a block have the scope of whatever it's calling
method has (machine this case, which has the scope of coins)? Thanks.
This topic is locked and can not be replied to.