Project

General

Profile

Backport #8881

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

=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 

Back