From: ts Date: 2006-04-19T23:23:31+09:00 Subject: Re: interested in metaprogramming? >>>>> "R" == Robert Dober writes: >> define_method(:a) {|a, &b| R> ^ R> | R> Here we go -----------------------+ R> do_something(a, &b) Well you have also this moulon% cat b.rb #!/usr/bin/ruby class Mine c = 24 define_method(:a) {|a, &b; c| p a, b ,c } end Mine.new.a(12) {|x| puts "block #{x}" } moulon% moulon% ruby -v b.rb ruby 1.9.0 (2006-04-08) [i686-linux] b.rb:4: warning: shadowing outer local variable - c 12 # nil moulon% Guy Decoux