Hi, Why does the first one work but not the second one? irb(main):001:0> class Test; end => nil irb(main):002:0> def Test.boo; def moo; puts "moo"; end; end => nil irb(main):003:0> Test.boo.moo moo => nil irb(main):001:0> class Test; def Test.boo; def moo; puts "moo"; end; end; end => nil irb(main):002:0> Test.boo.moo NoMethodError: undefined method `moo' for nil:NilClass from (irb):2 Thanks, Navin.