Nested iterators and their scope

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.