On Sat, 24 Jan 2004 02:45:07 +0900, Ian Macdonald wrote:
> Does anyone know of a way to detect whether default parameters are being
> used in a method? I'm looking for something like the pseudo-method
> 'default?' in the following example:
[snip]

Have you considered using 'nil' as default value?

server> ruby a.rb
42
42
666
server> expand -t2 a.rb 
def test(value=nil)
  value || 42
end
p test, test(nil), test(666)
server>

--
Simon Strandgaard