[#61424] [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals — Eric Wong <normalperson@...>

I'm unsure about this. I _hate_ the extra branches this adds;

13 messages 2014/03/12

[ruby-core:61373] [ruby-trunk - Bug #9611] [Rejected] Arithmetic operator following parentheses-less method gives ArgumentError

From: usa@...
Date: 2014-03-07 19:35:46 UTC
List: ruby-core #61373
Issue #9611 has been updated by Usaku NAKAMURA.

Status changed from Open to Rejected

Yes, this is well-known (but often misunderstood) ruby's spec.


----------------------------------------
Bug #9611: Arithmetic operator following parentheses-less method gives ArgumentError
https://bugs.ruby-lang.org/issues/9611#change-45684

* Author: Mat鱈as Battocchia
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: syntax
* Target version: 
* ruby -v: 2.0.0p195
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
It would be better to explain this with an example:

    > 'a'.length -1                                                                                                          
    ArgumentError: wrong number of arguments (1 for 0)
    from (pry):1:in `length'

Other ways of writing this expression work as expected:

    > 'a'.length() -1
    => 0

    > 'a'.length-1
    => 0

    > 'a'.length- 1
    => 0

    > 'a'.length - 1                                                                                                         
    => 0



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

In This Thread

Prev Next