From: Michael Neumann Date: 2001-10-24T05:25:19+09:00 Subject: [ruby-talk:23083] Re: Deprecate keyword? (what does 'module_eval < In article <3BD58DB4.2090404@emn.fr>, > Pierre-Charles David wrote: > >Morris, Chris wrote: > > I was looking through your code snippet and there is an idiom that I don't > understand, so I thought I'd ask and maybe learn something... > > > >---------------------------------------------------- > >class Module > > def deprecate(methodName) > > What does this following line mean/do? > > module_eval < > alias_method :deprecated_#{methodName}, :#{methodName} > > def #{methodName}(*args) > > $stderr.puts "Warning: calling deprecated method > >#{self}.#{methodName}" > > return deprecated_#{methodName}(*args) > > end > >END "<