Actions
Bug #8224
closeddefined?(()) and defined? () are inconsistent
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-04-05 trunk 40128) [x86_64-darwin11.4.0]
Backport:
Description
=begin
(({defined?(())})) and (({defined? ()})) return different values.
I would there to be no difference between (({defined? })) and (({defined?()})), except for precedence.
Example:
defined?( () ) # => "expression"
defined? () # => "nil"
=end
Updated by nobu (Nobuyoshi Nakada) about 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r40138.
Charlie, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
parse.y: "nil" for defined? with empty expression
- parse.y (new_defined): remove all extra parentheses, and return
"nil" for defined? with empty expression.
[ruby-core:54024] [Bug #8224]
Actions
Like0
Like0