ara.t.howard / noaa.gov schrieb:
> On Fri, 14 Jul 2006 Ara.T.Howard / noaa.gov wrote:
>>
>>  OPEN = File.method 'open'
>>
>>  class File
>>    def self.open(*a) 42 end
>>    end
>>  end
>>
>> ## now restore File.open using OPEN - remember that open takes a block...
> 
> correction.  start here
> 
>   open_m = File.method 'open'
> 
>   class File
>     def self.open(*a) 42 end
>     end
>   end
> 
> using a const makes it too easy and will accomplish what i need to do.

   class << File; self; end.class_eval do
     remove_method :open
   end

Regards,
Pit