G
Gavin Kistner
The 1.8 branch in CVS has them too.
Hrm. Not the .gz returned by
http://www.ruby-lang.org/cgi-bin/download-1.8.1.mrb, FWIW
Not currently. Is that something that would be generally useful?
Mostly, no
However, for times where a method does all sorts of weird type checking
and variable parameters (notably #new methods that have varied call
methods), yes, I think it would.
For example, I have:
# Can be called in one of five ways:
# * <tt>MutableTime.new( )</tt> -- same as #now
# * <tt>MutableTime.new( someString )</tt> -- same as #parse
# * <tt>MutableTime.new( someSeconds )</tt> -- same as #at
# * <tt>MutableTime.new( year, month, ... )</tt> -- same as #local
# * <tt>MutableTime.new( aTimeOrMutableTime )</tt> -- creates a new
MutableTime based off of
# the supplied Time or MutableTime object
def initialize( dateString_Seconds_Time_orYear = nil , *dateTimePieces )
The comments work reasonably well, but to help avoid confusion I feel
the need to create horrific variable names in the actual method itself.