It does not have to do with "loading methods" or such. It is purely
syntactical: the moment the parser sees an assignment without a
qualifier (dot) it parses this as a local variable assignment and the
local variable is known from that line on.
$ ruby -e 'def a;puts "a called"; 99 end;p a; p defined?(a); a=8; p a;
p defined?(a)'
a called
99
"method"
8
"local-variable"
Kind regards
robert
···
On Tue, Dec 10, 2013 at 5:15 PM, panchiz D. <lists@ruby-forum.com> wrote:
I thought that the interpreter should have loaded up all the methods but
seems logic what you are pointing.