From: Wesley J Landaker Date: 2003-05-21T09:25:41+09:00 Subject: Re: restore backquote after overloading On Tuesday 20 May 2003 5:55 pm, Simon Strandgaard wrote: > Is it possible to restore the original backquote ? Well, it would be NICE if you could do: alias :builtin_backquote :` def `(cmd) puts "hello" end ... then ... def `(cmd) builtin_backquote(cmd) end But, alas, it doesn't like :`, nor can you use '`'.intern (at least in 1.6.8) But, you CAN do something like this instead, and it works "fine" (depending on your definition of "fine" ;) $builtin_backquote = method('`'.intern) def `(cmd) puts 'hello' end `uptime` def `(cmd) $builtin_backquote.call(cmd) end `uptime` Somebody else is bound to offer a better solution than this, but it is a quick way to get it done. =) -- Wesley J. Landaker - wjl@icecavern.net OpenPGP FP: C99E DF40 54F6 B625 FD48 B509 A3DE 8D79 541F F830