From: dusty Date: 2008-06-30T04:12:23+09:00 Subject: implicit vs explicit self in private methods I'm trying to understand the difference between implicitly and explicitly calling a private method and am hoping someone could shed some light on this for me. class Tester def public_hello_good say_hello end def public_hello_bad self.say_hello end private def say_hello "hello" end end irb(main):001:0> require 'tester' => true irb(main):002:0> a = Tester.new => # irb(main):003:0> a.public_hello_good => "hello" irb(main):004:0> a.public_hello_bad NoMethodError: private method `say_hello' called for # from ./tester.rb:6:in `public_hello_bad' from (irb):4 from :0 What I'm wondering is why does this not work when I call self.say_hello, but does work when I call say_hello? Since self is the receiver in both cases, it seems that they would both work. Anyone have any insight that they'd be willing to share on why it works like that? Thanks