Skip to content

Commit

Permalink
Fix Module#instance_method for prepended modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
jemc committed Apr 30, 2015
1 parent cebed46 commit 96e7a3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/common/module.rb
Expand Up @@ -165,7 +165,7 @@ def instance_method(name)

mod = self
while mod
if entry = mod.method_table.lookup(name)
if mod == mod.origin && entry = mod.method_table.lookup(name)
break if entry.visibility == :undef

if meth = entry.method
Expand Down
1 change: 0 additions & 1 deletion spec/tags/ruby/core/module/prepend_tags.txt

This file was deleted.

0 comments on commit 96e7a3d

Please sign in to comment.