Project

General

Profile

Actions

Feature #17384

closed

shorthand of Hash#merge

Added by tjdgnsqn133 (Kim Seonghoon) almost 4 years ago. Updated almost 4 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)

Is duplicate of Ruby master - Feature #6225: Hash#+Rejectedmatz (Yukihiro Matsumoto)03/30/2012Actions

Updated by tjdgnsqn133 (Kim Seonghoon) almost 4 years ago

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

Updated by shyouhei (Shyouhei Urabe) almost 4 years ago

Updated by shyouhei (Shyouhei Urabe) almost 4 years ago

  • 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 4 years ago

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0