From: Joel VanderWerf Date: 2004-08-28T05:59:36+09:00 Subject: Re: Literate testing? Massimiliano Mirra - bard wrote: > class Calculator > extend Literate > > example(__FILE__, __LINE__) do |calc| ... Since you are passing a block, you can get the file and line from it, as in: def get_fl(&bl) eval "[__FILE__, __LINE__]", bl end class Foo puts get_fl {} puts [__FILE__, __LINE__] end