Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Cool
- @var
- def test
- @var = "test"
- puts @var.inspect
- end
- end
- class Ok
- def initialize
- Cool::test
- end
- end
- obj = Ok.new
- # --- output
- #test.rb:12:in `initialize': private method `test' called for Cool:Class (NoMethodError)
- # from test.rb:16:in `new'
- # from test.rb:16:in `<main>'
Add Comment
Please, Sign In to add comment