From: Intransition Date: 2011-09-17T03:39:43+09:00 Subject: Re: Can monkey patching be discovered when you require a library? On Sep 12, 10:52 pm, Nick Klauer wrote: > Is it possible to know whether a method, class, or instance was overridden > by another when you require 'said_gem' in (i.e. monkeypatched)?  I'm > thinking something that would let gem users know if a gem is going to > override core methods or attrs? Turn on warnings. $ cat t.rb class String def to_s; end end $ ruby -w t.rb t.rb:2: warning: method redefined; discarding old to_s