[ruby-core:82139] [Ruby trunk Bug#13547] [].delete 1 { 'NG' }

From: nagachika00@...
Date: 2017-07-23 08:59:13 UTC
List: ruby-core #82139
Issue #13547 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r59409 merged revision(s) 58641.

----------------------------------------
Bug #13547: [].delete 1 { 'NG' }
https://bugs.ruby-lang.org/issues/13547#change-65897

* Author: shyouhei (Shyouhei Urabe)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-05-08 trunk 58609) [x86_64-darwin15]
* Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE
----------------------------------------
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



-- 
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>

In This Thread

Prev Next