From: "matz (Yukihiro Matsumoto)" Date: 2012-11-13T20:59:33+09:00 Subject: [ruby-core:49299] [ruby-trunk - Feature #7346][Rejected] object(...) as syntax sugar for object.call(...) Issue #7346 has been updated by matz (Yukihiro Matsumoto). Status changed from Open to Rejected I have once tried, but it caused serious incompatibility problem for example: p = Object.new p(15) So compromise with object.() syntax introduced in 1.9. Matz. ---------------------------------------- Feature #7346: object(...) as syntax sugar for object.call(...) https://bugs.ruby-lang.org/issues/7346#change-32857 Author: rosenfeld (Rodrigo Rosenfeld Rosas) Status: Rejected Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: core Target version: Next Major I propose for the parser to interpret "object(...)" as "object.call(...)". It should raise NoMethodError at runtime if object doesn't respond to "call". This would read better than using "call": double = -> n { n * 2 } double(3) == 6 Sorry if this has already been proposed before (and rejected) but I couldn't find any references to something like this using Redmine's search interface. -- http://bugs.ruby-lang.org/