Guest User

Untitled

a guest
May 26th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. class Foo
  2. Constant = %w[ one two three ]
  3.  
  4. def putsConstant
  5. puts self.class::Constant.inspect
  6. end
  7. end
  8.  
  9.  
  10. class Foo2 < Foo
  11. Constant += %w[ four five six ]
  12.  
  13. def initialize *args, &blk
  14. putsConstant
  15. end
  16. end
  17.  
  18. Foo2.new
  19. Foo2::Constant
Add Comment
Please, Sign In to add comment