[ create a new paste ] login | about

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

Ruby, pasted on Jun 5:
1
2
3
4
5
6
7
8
9
10
11
12
13
class Parent
  protected
  def method
    p true
  end

  public
  def call_method(p)
    p.method
  end
end

Parent.new.call_method(Parent.new)


Output:
1
true


Create a new paste based on this one


Comments: