How about reading a Ruby book or two, or working through
codecademy.com/tracks/ruby BEFORE asking any more questions. You haven't
the slightest clue about the Ruby language at ALL.

Before you waste this list's time further, do some studying. You are not
owed help from this list, JUST because you joined. You have to put in
EFFORT in your learning for the list to aid you, which people have tried
to do even though you show no effort on your part.

Work on the basics by working through the URLs, and books you were
assigned before asking for further assistance.



On 2/26/13 2:08 PM, "Love U Ruby" <lists / ruby-forum.com> wrote:

>Doing more play with it I found the below code:
>
>def test
>p "First level # => #{self}"
>def show
>p "Second level # => #{self}"
>end
>end
># => nil
>Object.new.test.show
>"First level # => #<Object:0x000000014a77b0>"
>"Second level # => "
># => "Second level # => "
>Object.new.test.show.class
>"First level # => #<Object:0x0000000130ef70>"
>"Second level # => "
># => String
>
>Why the `p "Second level # => #{self}"` statement self has `""` value?
>
>-- 
>Posted via http://www.ruby-forum.com/.
>