From: "Bruce F." Date: 2010-11-07T12:22:09+09:00 Subject: Code in a class but not in a method -- please explain! I'm a newcomer to Ruby, and I'm confused about what executable statements which are in a class definition, but not explicitly in a method, mean. How are they executed? I assume that there's an implicit method that they define; is that right? The most obvious example is the one-line program: puts "Hello, World!" Since there's no explicit class definition, I understand that it's in an automatically generated class (main). But, what method of that class is it in? And, if it were an explicit class, how would I execute it? (Apparently it's executed automatically if it's in main.) Thanks, Bruce -- Posted via http://www.ruby-forum.com/.