Issue #8881 has been updated by nobu (Nobuyoshi Nakada).

Description updated
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'.
----------------------------------------
Bug #8881:  Refinment doesn't update #methods
https://bugs.ruby-lang.org/issues/8881#change-41705

Author: minad (Daniel Mendler)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: r42901
Backport: 1.9.3: DONTNEED, 2.0.0: REQUIRED


=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



-- 
http://bugs.ruby-lang.org/