Project

General

Profile

Actions

Bug #13547

closed

[].delete 1 { 'NG' }

Added by shyouhei (Shyouhei Urabe) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-05-08 trunk 58609) [x86_64-darwin15]
[ruby-core:81037]

Description

Is this intentional?

% ruby --dump=parsetree -vwce "x 1 { 2 }"
ruby 2.5.0dev (2017-05-08 trunk 58609) [x86_64-darwin15]
Syntax OK
###########################################################
## Do NOT use this node dump for any purpose other than  ##
## debug and research.  Compatibility is not guaranteed. ##
###########################################################

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_PRELUDE (line: 1)
#     +- nd_head:
#     |   (null node)
#     +- nd_body:
#     |   @ NODE_ITER (line: 1)
#     |   +- nd_iter:
#     |   |   @ NODE_FCALL (line: 1)
#     |   |   +- nd_mid: :x
#     |   |   +- nd_args:
#     |   |       @ NODE_ARRAY (line: 1)
#     |   |       +- nd_alen: 1
#     |   |       +- nd_head:
#     |   |       |   @ NODE_LIT (line: 1)
#     |   |       |   +- nd_lit: 1
#     |   |       +- nd_next:
#     |   |           (null node)
#     |   +- nd_body:
#     |       @ NODE_SCOPE (line: 1)
#     |       +- nd_tbl: (empty)
#     |       +- nd_args:
#     |       |   (null node)
#     |       +- nd_body:
#     |           @ NODE_LIT (line: 1)
#     |           +- nd_lit: 2
#     +- nd_compile_option:
#         +- coverage_enabled: false

https://gist.github.com/JunichiIto/54f1d0dbb928566f5083b6caf9d8a2b2


Related issues 5 (0 open5 closed)

Related to Ruby master - Bug #505: 1.upto 2 {|i| p i }Closedmatz (Yukihiro Matsumoto)08/27/2008Actions
Related to Ruby master - Bug #11873: Syntax error and parse problem when calling a method without parenthesesClosedActions
Related to Ruby master - Bug #13691: Word- and symbol array literals not valid where regular array isRejectedActions
Related to Ruby master - Bug #13898: Block parsing regressionRejectedActions
Related to Ruby master - Bug #14023: SyntaxError on array argument and blockRejectednobu (Nobuyoshi Nakada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0