From: Joey Zhou Date: 2011-03-25T21:23:02+09:00 Subject: How to get the value of a singleton class? Here is a sample code: str = "ABC" class << str p self end What I get is somthing like "#>". If "p str", there's an error message: x.rb:3:in `singletonclass': undefined local variable or method `str' for #> (NameError) How can I get the value of str("ABC") within the class << str;...;end block? Thank you. Joey -- Posted via http://www.ruby-forum.com/.