Created
April 15, 2013 19:56
-
-
Save tyler-smith/5390856 to your computer and use it in GitHub Desktop.
"Reload" class breaks is_a?/kind_of?/instance_of?
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
class A;end | |
first = A.new | |
Object.send(:remove_const, 'A') | |
class A;end | |
second = A.new | |
p first.is_a? A #=> false | |
p second.is_a? A #=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment