Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- Constant = %w[ one two three ]
- def putsConstant
- puts self.class::Constant.inspect
- end
- end
- class Foo2 < Foo
- Constant += %w[ four five six ]
- def initialize *args, &blk
- putsConstant
- end
- end
- Foo2.new
- Foo2::Constant
Add Comment
Please, Sign In to add comment