From: usa@... Date: 2014-03-07T19:35:46+00:00 Subject: [ruby-core:61373] [ruby-trunk - Bug #9611] [Rejected] Arithmetic operator following parentheses-less method gives ArgumentError 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/