From: 7stud -- Date: 2007-10-03T00:54:58+09:00 Subject: Re: Discarding putc But Not puts Andrew Stewart wrote: > On 2 Oct 2007, at 13:36, 7stud -- wrote: >> >> alias putc orig_putc >> end > > Aliasing back again worked -- thanks. > > It produces a warning ("discarding old putc") when it encounters the > second alias, at the end of the target method. But I can live with > that. > I think the warning is saying, "Hey, there won't be any reference to the putc def inside func if you do that last alias. Well, how about using another alias to save the putc def in? ... alias garbage putc alias putc orig_putc end -- Posted via http://www.ruby-forum.com/.