Skip to content

Instantly share code, notes, and snippets.

@tyler-smith
Created April 15, 2013 19:56
Show Gist options
  • Save tyler-smith/5390856 to your computer and use it in GitHub Desktop.
Save tyler-smith/5390856 to your computer and use it in GitHub Desktop.
"Reload" class breaks is_a?/kind_of?/instance_of?
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