From: Mike Gold Date: 2009-01-26T10:27:39+09:00 Subject: Re: unalias a method? Todd Burch wrote: > Mike Gold wrote: > >> >> In that case, maybe push/pop would make things easier. >> > > Didn't work. > > > todd-burchs-computer:myruby toddburch$ ruby pushpop.rb > pushpop.rb:6: syntax error, unexpected tAMPER, expecting '|' > define_method(:push_method) { |method_name, &block| > ^ > pushpop.rb:12: syntax error, unexpected '}', expecting kEND > } > ^ > todd-burchs-computer:myruby toddburch$ The |&block| syntax is supported on 1.8.7+. Rewriting MethodStack for 1.8.6 is left as an exercise. -- Posted via http://www.ruby-forum.com/.