diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 10:47:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 10:47:43 +0000 |
commit | 829e5ec72743337ff617d7e41fdccec8897da6ba (patch) | |
tree | cf3172b4d047af3e96f450b04f406f3c9ded91f2 /ext/date | |
parent | 4d455537e871b3415bf0beed10f1ed2559c35bb8 (diff) | |
download | ruby-829e5ec72743337ff617d7e41fdccec8897da6ba.tar.gz |
parse.y: ambiguous parentheses
* parse.y (parser_yylex): warn ambiguous parentheses after a space
in method definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-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 |