From: "Jan E." Date: 2012-06-21T17:21:46+09:00 Subject: Re: New to Ruby - Scope Question Hi, Emeka Patrick wrote in post #1065478: > Can someone explain why this is so. I guess I don't NEED to know why, > but I'd like to understand it a bit better if possible. Thanks! The question has already been answered, but you can actually try out things like that yourself: x = 123 def f() puts x end f() Since you get an error for an undefined local variable or method, Ruby's methods obviously don't see outer variables. And for the other question: def g() a = 123 end g() puts a Again you get an error. So this doesn't work either. -- Posted via http://www.ruby-forum.com/.