[ create a new paste ] login | about

Link: http://codepad.org/exg9pvDs    [ raw code | output | fork ]

Ruby, pasted on Dec 28:
1
2
3
4
5
6
7
8
9
10
class M
  def initialize
    def hello
    end
  end
end

p M.method_defined?(:hello)
M.new
p M.method_defined?(:hello)


Output:
1
2
false
true


Create a new paste based on this one


Comments: