From: "Kent S." Date: 2004-02-22T16:19:51+09:00 Subject: Re: Beginner here, have some questions Your simple code is being executed in the context of some private Object instance. $ irb irb(main):001:0> self.class => Object irb(main):002:0> Object class includes Kernel module which in turn defines all these puts, print, etc. methods. Your x variable is the local variable. All methods defined at the top level context become private methods of this private Object. /kent Sang Kim wrote: > Ruby beginner here. Heard of it before and on a whim decided to check > it out a couple of days ago and I love it. I friggin love it. > I'm doing stuff that would take me a while to figure out with other > languages' syntax. I've never seen a language that looks so "clean." > > Anyway, I have some questions I couldn't find in the FAQ > > sample code: > > x = 2 > puts x > > Now, is "puts" a class or instance method of Object? What about "x"? > Is that a class or instance variable of an Object? > When you run a Ruby program, is the program an instance of Object? > > >