Backport #8881
closed
Refinment doesn't update #methods
Added by Anonymous over 10 years ago.
Updated over 10 years ago.
Description
=begin
Hi,
the refinements don't respect #methods. Consider the following:
Object.methods.include?(:foo) # returns false
Module.methods.include?(:foo) # returns false
module Test
refine Object do
def foo; end
end
end
puts Object.methods.include?(:foo)# returns true
puts Module.methods.include?(:foo)# returns true
Object.new.foo # Exception
Daniel Mendler
=end
- Description updated (diff)
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: REQUIRED
- ruby -v set to r42901
It should be instance_methods', not
methods'.
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r42903.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
class.c: exclude refined methods
- class.c (method_entry_i): should exclude refined methods from
instance method list. [ruby-core:57080] [Bug #8881]
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Status changed from Closed to Assigned
- Assignee set to nagachika (Tomoyuki Chikanaga)
- Status changed from Assigned to Closed
This issue was solved with changeset r42924.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 42903: [Backport #8881]
* class.c (method_entry_i): should exclude refined methods from
instance method list. [ruby-core:57080] [Bug #8881]
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0