Created
March 13, 2014 17:31
-
-
Save ranjib/9533011 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
class MyRecipe | |
end | |
module Extension | |
def foo | |
end | |
end | |
r1 = MyRecipe.new | |
r2 = MyRecipe.new | |
r1.instance_eval do | |
extend Extension | |
end | |
r1.respond_to?(:foo) # true | |
r2.respond_to?(:foo) # false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment