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

Actions

Also available in: PDF Atom