From: Trans Date: 2007-01-03T05:08:36+09:00 Subject: Re: Detecting default used in method calls Eric Hodel wrote: > No need to do those complicated things that everybody else is > trying. Instead use an object that nobody else will pass you as a > sentinel: > > class X > > SENTINEL = Object.new > > def the_function(a, b = SENTINEL) > if b == SENTINEL then > ... > end > end > > end You don't need to create your own, Exception works quite well: class X def the_function(a, b = Exception) if b == Exception then ... end end end T.