Skip to content

Instantly share code, notes, and snippets.

Created June 12, 2012 10:06
Show Gist options
  • Save anonymous/2916706 to your computer and use it in GitHub Desktop.
Save anonymous/2916706 to your computer and use it in GitHub Desktop.
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