Created
June 12, 2012 10:06
-
-
Save anonymous/2916706 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
module Foo | |
def change_var(nv) | |
@@blah = nv | |
end | |
def print_var | |
puts @@blah | |
end | |
end | |
class A | |
extend Foo | |
end | |
class B | |
extend Foo | |
end | |
A.change_var(4) | |
A.print_var | |
B.print_var |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment