Project

General

Profile

Actions

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0