From: Jimmy Kofler Date: 2007-01-20T03:37:16+09:00 Subject: what's wrong with this snippet ... Hi, all! I've just stumbled over this orphaned snippet on my hard drive that returns a NoMethodError message instead of "Method meow called"! Is there a workaround? Thanks! AnimalSounds = Module.new AnimalSounds.class_eval %q! def createSound(attr_name) class_eval <<-EOS def #{attr_name}; puts "Method #{attr_name} called"; end EOS end! Pet = Object.clone.extend(AnimalSounds) Pet.createSound("meow") fido = Pet.clone fido.meow # undefined method `meow' for # (NoMethodError) -- Posted via http://www.ruby-forum.com/.