From: ts Date: 2000-12-31T01:39:16+09:00 Subject: [ruby-talk:8360] define_method () How it work ? pigeon% cat b.rb #!/usr/bin/ruby class Toto def gamma() puts "gamma" end define_method(:alpha) { puts "alpha" } define_method(:beta, Toto.new.method(:gamma)) end Toto.new.beta Toto.new.alpha pigeon% b.rb gamma ./b.rb:8: undefined method `alpha' for # (NameError) pigeon% it don't exist a problem with the comparison ( != rather than == ) ? else if (RDATA(body)->dmark != (RUBY_DATA_FUNC)blk_mark) { rb_add_method(mod, id, NEW_BMETHOD(body), NOEX_PUBLIC); } Guy Decoux