From: Love U Ruby Date: 2013-02-27T03:19:46+09:00 Subject: Confusion with self within methods. To see who is playing the role of `self` in `nested methods`, I tried the below code: def test p "#{self}" def show p "#{self}" end end # => nil As an effect, I got the two objects below: Object.new.test "#" # => nil Object.new.test.show "#" #<~~~ this is self understood "" #<~~~ how this one came? # => "" But from the encoded numbers, I couldn't understand which class those objects belong to. And I tried the code below and got the respective `class` names. Object.new.test.class "#" # => NilClass Object.new.test.show.class "#" "" # => String So can anyone help me to understand the concept of how the above code produced those `class` names? -- Posted via http://www.ruby-forum.com/.