From: Anders Bengtsson Date: 2001-04-18T03:17:16+09:00 Subject: [ruby-talk:13773] Re: Wrapping objects On Tue, 17 Apr 2001, Guy Decoux wrote: > module Persistable > class << self > def append_features(klass) > klass.instance_eval <<-EOT > alias :new_old :new > def new(*args) > PersistentWrapper.new(new_old(*args)) > end > EOT > end > end > end Thank you, that seems to solve most of the problems I had with the wrapper! Actually, the only remaining problem now is that the Emacs' ruby-mode doesn't recognize multi-line strings, so it shows the wrong colors for the argument to instance_eval. But I can live with that. ;-) /Anders _____________________________________________________________________ A n d e r s B e n g t s s o n ndrsbngtssn@yahoo.se Stockholm, Sweden _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com