[ruby-core:68996] [Ruby trunk - Bug #11099] [Rejected] def assert method raise syntax error

From: nobu@...
Date: 2015-04-26 21:48:36 UTC
List: ruby-core #68996
Issue #11099 has been updated by Nobuyoshi Nakada.

Description updated
Status changed from Open to Rejected

It's a spec, `and` has lower precedence.

----------------------------------------
Bug #11099: def assert method raise syntax error
https://bugs.ruby-lang.org/issues/11099#change-52256

* Author: roro co
* Status: Rejected
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
In ruby 2.2, when i try

~~~ruby
def assert(*args, &blk)

end

assert(a > 0 and a < 1)
~~~

it will raise 

~~~
Uncaught exception: /home/roroco/Dropbox/rbs/ro_btc/ex/ex.rb:5: syntax error, unexpected keyword_and, expecting ')'
assert(a > 0 and a < 1)
~~~



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next