From: Dave Thomas Date: 2001-04-28T02:32:09+09:00 Subject: [ruby-talk:14337] Re: method for adding methods? matz@zetabits.com (Yukihiro Matsumoto) writes: > Module#define_method is available for 1.7, but handle it with care. > It may not work as you expect, because of method/block difference. For example, you can use it to implement class variables that are only accessible to instances! class Strange a = 1 define_method(:a) { a } define_method(:inc) { a += 1 } end o1 = Strange.new o2 = Strange.new puts o1.a #=> 1 o2.inc puts o1.a #=> 2 And the scary part is that someone will find a use for this :) Dave