diff options
-rw-r--r-- | ext/date/lib/date.rb | 14 | ||||
-rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 2 | ||||
-rw-r--r-- | parse.y | 4 |
3 files changed, 12 insertions, 8 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 diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index 61e1f43e00..94aba3520b 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -381,7 +381,7 @@ module OpenSSL::Buffering # Writes +s+ to the stream. +s+ will be converted to a String using # String#to_s. - def << (s) + def <<(s) do_write(s) self end @@ -8520,6 +8520,10 @@ parser_yylex(struct parser_params *parser) else if (IS_SPCARG(-1)) { c = tLPAREN_ARG; } + else if (IS_lex_state(EXPR_ENDFN) && space_seen) { + rb_warning0("parentheses after method name is interpreted as"); + rb_warning0("an argument list, not a decomposed argument"); + } paren_nest++; COND_PUSH(0); CMDARG_PUSH(0); |