Project

General

Profile

Actions

Feature #17384

closed

shorthand of Hash#merge

Feature #17384: shorthand of Hash#merge

Added by tjdgnsqn133 (Kim Seonghoon) almost 5 years ago. Updated almost 5 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:101355]

Description

Hi, all.
When I used Hash#merge, I thought it is uncomfortable.

a = {k: 1} b = {j: 2} c = a.merge(b) 

If hash provides + like array, so useful.


Related issues 1 (0 open1 closed)

Updated by tjdgnsqn133 (Kim Seonghoon) almost 5 years ago Actions #1 [ruby-core:101357]

a = {k: 1} b = {j: 2} c = a.merge(b) d = a + b # same as c 

Updated by shyouhei (Shyouhei Urabe) almost 5 years ago Actions #2

Updated by shyouhei (Shyouhei Urabe) almost 5 years ago Actions #3 [ruby-core:101358]

  • Status changed from Open to Feedback

Please refer to previous discussions. Do you have some new insights around this area?

Updated by tjdgnsqn133 (Kim Seonghoon) almost 5 years ago Actions #4 [ruby-core:101360]

Thanks,
I didn't know the issue has been argued.
From now on, I search issues first before write.

Actions

Also available in: PDF Atom