Issue #10778 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Feedback to Rejected
In Ruby, a space before an opening parenthesis often has significant meanings.
Combining `defined?(a)` higher than `&&` is considered reasonable.
----------------------------------------
Bug #10778: `defined?(expr)` should be equivalent to `defined? (expr)` not `(defined? expr)`
https://bugs.ruby-lang.org/issues/10778#change-80648
* Author: bughit (bug hit)
* Status: Rejected
* Priority: Normal
* Assignee:
* Target version:
* 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
----------------------------------------
defined? is an operator not a method, its operand is defined as the expressions to its right.
It does not even require a space: `defined?a`
So `defined?(a)` should be equivalent to `defined? (a)` instead of `(defined? a)`
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>