This project is archived and is in readonly mode.
[PATCH] deep_merge does not work on HashWithIndifferentAccess
-
david.cizek (at gmail)
My last "should be something..." was stupid, I did not mentioned?! 2 lines before, sorry. But still... does not work.
I tried to document the behaviour little bit more on:
http://gist.github.com/119217David
-
CancelProfileIsBroken
- Tag set to bugmash
-
Derander
- Tag changed from bugmash to bugmash, patch
+1 verified.
I packaged the (slightly tweaked) above methods into a patch with failing tests.
The patch should apply against 2-3-stable.
-
Derander
- Title changed from deep_merge does not work on HashWithIndifferentAccess to [PATCH] deep_merge does not work on HashWithIndifferentAccess
-
Rizwan Reza
- Tag changed from bugmash, patch to 2.3.x, bugmash, patch, verified
verified
+1 The patch applies cleanly under 2-3-stable only.
-
Kieran P
- Tag changed from 2.3.x, bugmash, patch, verified to bugmash, patch
+1 Verified, and patch applies to 2-3 cleanly and fixes included test.
Also ported to master. Attaching patch now.
-
Jeremy Kemper
Kieran, when you apply commits from 2-3-stable to master (or vice versa), use
git cherry-pick <revision>to retain the original authorship and commit message. -
Derander
Here is my patch applied for master.
-
Rizwan Reza
verified
+1 The patch applies cleanly and all tests pass.
-
José Valim
We cannot put Rails current deep_merge into a module and add the module to both Hash and ActiveSupport::HashWithIndifferentAccess?
-
Jeremy Kemper
Good call. A mixin is best here.
-
Derander
I don't think a mixin is needed because HashWithIndiff inherits from Hash.
Anyways, here is an alternate implementation of the above patch where it replaces Hash's deep_merge method
Tests all pass on master
-
Rizwan Reza
verified
+1 This patch applies cleanly.
-
Tristan Dunn
+1
Verified Derander's patch applies cleanly to master and tests are passing.
-
Repository
- State changed from new to committed
(from [ca92d44e7637ae6d28d6b88b67873d2795290cb5]) Support deep-merging HashWithIndifferentAccess.
[#2732 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/ca92d44e7637ae6d28d6b88b67873d... -
CancelProfileIsBroken
- Tag changed from bugmash, patch to patch
- Milestone cleared.
-
Santiago Pastorino
- Milestone set to 2.3.9
- Assigned user set to Jeremy Kemper
We should apply the patch of Derander here https://rails.lighthouseapp.com/projects/8994/tickets/2732/a/239253...
-
Santiago Pastorino
- State changed from committed to open
-
Santiago Pastorino
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
