Project

General

Profile

This project is closed and read-only.

Actions

Backport #8881

closed

Refinment doesn't update #methods

Backport #8881: Refinment doesn't update #methods

Added by Anonymous about 13 years ago. Updated about 13 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

Updated by nobu (Nobuyoshi Nakada) about 13 years ago Actions #1 [ruby-core:57097]

  • 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'.

Updated by nobu (Nobuyoshi Nakada) about 13 years ago Actions #2

  • 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]

Updated by nagachika (Tomoyuki Chikanaga) about 13 years ago Actions #3

  • Tracker changed from Bug to Backport
  • Project changed from Ruby to 15
  • Status changed from Closed to Assigned
  • Assignee set to nagachika (Tomoyuki Chikanaga)

Updated by nagachika (Tomoyuki Chikanaga) about 13 years ago Actions #4

  • 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]
Actions

Also available in: PDF Atom