From: Ralph Mason Date: 2001-11-22T15:16:32+09:00 Subject: [ruby-talk:26114] Re: What am I missing here? Why should Kernel.instance_eval not give the same behavior as a method added to the module? Thanks Ralph > R> What am I missing here? > > $_ (like $~) is a local and thread local variable. > > R> irb(main):001:0> $_= "ruby" > R> "ruby" > R> irb(main):002:0> module Kernel ; def upcase ; $_.upcase! ; end ; end > > Inside #upcase $_ is nil because it was never assigned. > > Guy Decoux >