Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module InstanceMethods
- def const_lookup
- A
- end
- end
- class Consts
- A = "Hello World"
- include InstanceMethods
- end
- c = Consts.new
- c.const_lookup
- rmulliga@rtmlap:~/bs$ ruby test.rb
- test.rb:3:in `const_lookup': uninitialized constant InstanceMethods::A (NameError)
- from test.rb:14
Add Comment
Please, Sign In to add comment