From: Trans Date: 2007-09-17T02:00:10+09:00 Subject: Re: blocks expected arguments and metaprogramming On Sep 16, 8:10 am, "Pedro Del Gallego" wrote: > hi all, > > in this (http://pastie.caboo.se/97662) code : > > module Kernel > def expected_argument_list > 2 > end > def before (name, &blk) puts :hola define_method(name){ if blk.arity==1 yield :only_one else yield :one,:two end } end end It's not quite as simple as that but that should be enough to move you forward. T.