diff options
Diffstat (limited to 'ext/date/lib')
-rw-r--r-- | ext/date/lib/date.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb index 48ce6316bd..c10441e573 100644 --- a/ext/date/lib/date.rb +++ b/ext/date/lib/date.rb @@ -15,17 +15,17 @@ class Date protected :d - def zero? () false end - def finite? () false end - def infinite? () d.nonzero? end - def nan? () d.zero? end + def zero?() false end + def finite?() false end + def infinite?() d.nonzero? end + def nan?() d.zero? end def abs() self.class.new end - def -@ () self.class.new(-d) end - def +@ () self.class.new(+d) end + def -@() self.class.new(-d) end + def +@() self.class.new(+d) end - def <=> (other) + def <=>(other) case other when Infinity; return d <=> other.d when Numeric; return d |