From: Mauricio Fernandez Date: 2006-09-12T08:07:27+09:00 Subject: Re: Getting argument names and default values: doable (if hackish) On Tue, Sep 12, 2006 at 06:53:26AM +0900, Ezra Zygmuntowicz wrote: > > ez engine_yard $ method_args.rb benchmark > # > Benchmark#benchmark (...) > Benchmark#bm (...) [...] > I'm on OSX Tiger latest with my own compiled ruby1.8.4. Does this > require 1.8.5 or am I doing something stupid? Alright, it took only 1 line to make it work on both 1.8.5 and previous versions: $ ruby183 -v method_args-pre185.rb benchmark ruby 1.8.3 (2005-09-21) [i686-linux] Benchmark#benchmark (caption = "", label_width = nil, fmtstr = nil, *labels) Benchmark#bm (label_width = 0, *labels) Benchmark#bmbm (width = 0) Benchmark#measure (label = "") [...] I've updated the code on eigenclass.org; could you give it a try? (btw. no need to apply the patch in the comments, I had already done so) -- Mauricio Fernandez - http://eigenclass.org - singular Ruby