Created
August 24, 2011 00:32
-
-
Save kbaribeau/1167005 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Foo | |
Object = nil | |
def getBinding() | |
binding() | |
end | |
end | |
Foo::Object #returns nil | |
Object #returns Object | |
eval("Object", Foo.new.getBinding()) #returns nil | |
eval("::Object", Foo.new.getBinding()) #returns Object | |
class Foo | |
::Object = nil # warning: already initialized constant Object | |
end | |
Object #returns nil | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment