Last active
December 16, 2015 21:12
-
-
Save djberg96/e08ba8bd9bef29a822ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In lib/bar.rb | |
module Bar | |
STUFF = 7 | |
end | |
require_relative 'bar/baz' | |
# In lib/bar/baz.rb | |
module Bar | |
class Baz | |
def initialize | |
puts Bar::STUFF | |
end | |
end | |
end | |
Bar::Baz.new | |
> ruby -Ilib -rbar lib/bar/baz.rb | |
# ERROR - uninitialized constant Bar::STUFF | |
Update: NM, working. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment