# Warning: method redefined; discarding old \<=\>

**URL:** <https://www.ruby-forum.com/t/warning-method-redefined-discarding-old/192760>\
**Category:** Ruby\
**Created:** [August 5, 2010, 4:49am UTC](https://www.ruby-forum.com/t/warning-method-redefined-discarding-old/192760 "2010-08-05T04:49:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [August 5, 2010, 4:49am UTC](https://www.ruby-forum.com/t/warning-method-redefined-discarding-old/192760/1 "2010-08-05T04:49:13Z")

</div>

I have monkey patched the spaceship operator in an FXRuby Class.

I _do_ want to do this … so how do I turn off this warning?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [August 5, 2010, 10:12am UTC](https://www.ruby-forum.com/t/warning-method-redefined-discarding-old/192760/2 "2010-08-05T10:12:48Z")

</div>

Ralph S. wrote:

> I have monkey patched the spaceship operator in an FXRuby Class.
> 
> I _do_ want to do this … so how do I turn off this warning?

I’d just do:

begin  
old\_verbose = $VERBOSE  
$VERBOSE = false  
do\_stuff  
ensure  
$VERBOSE = old\_verbose  
end
