From: "Aleksi Niemelä" Date: 2000-07-06T12:04:01+02:00 Subject: [ruby-talk:03861] main.method How I can make this work, that is to print blop and blop instead of blop and burp? How to call methods defined in Object just like methods in any other class? That means the method don't get wrong self? I thought main.burp would deal with the problem, but it seems that I can't access main. This mail relates to [ruby-talk:03846] -thread, but is the same thing from another point of view. - Aleksi class Fish def initialize @burp = "burp" end def burp puts globalBurp puts main.globalBurp end end @burp = "blop" def globalBurp p self @burp end puts globalBurp, "\n" puts "now I expect fish to (blobal) burp, which means 'blop'" Fish.new.burp ###################### Outputs: # blop now I expect fish to (blobal) burp, which means 'blop' # burp main.rb:7:in `burp': undefined local variable or method `main' for # (NameError) from main.rb:21