From: Love U Ruby Date: 2013-02-27T02:28:14+09:00 Subject: Re: undefined local variable or method `m' tried the below also: >> class Test >> @m=self >> def self.show >> print "hi" >> end >> def display >> m.show >> end >> end => nil >> foo = Test.new => # >> foo.display NameError: undefined local variable or method `m' for # from (irb):18:in `display' from (irb):22 from /usr/bin/irb:12:in `
' I think something I am doing wrong,conceptually here. What is it,could you tell me? -- Posted via http://www.ruby-forum.com/.