Last active
March 2, 2016 18:39
-
-
Save theoretick/c7c82a9d65b87cb27df8 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
10:21:48 $ irb | |
irb(main):001:0> module FooA | |
irb(main):002:1> BAR = "bar" | |
irb(main):003:1> end | |
=> "bar" | |
irb(main):004:0> FooA::BAR | |
=> "bar" | |
irb(main):005:0> module FooB | |
irb(main):006:1> class << self | |
irb(main):007:2> BAR = "bar" | |
irb(main):008:2> end | |
irb(main):009:1> end | |
=> "bar" | |
irb(main):010:0> FooB::BAR | |
NameError: uninitialized constant FooB::BAR | |
from (irb):10 | |
from /Users/lucas/.rbenv/versions/2.1.2/bin/irb:11:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment