Created
September 18, 2015 11:28
-
-
Save stevenday/e6618ac4969d24e27bf7 to your computer and use it in GitHub Desktop.
BSON::Document bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attributes = BSON::Document.new | |
attributes["test"] = nil | |
(attributes["test"] ||= {}).merge!({"test" => "test}) | |
# You'd expect attributes["test"] to be {"test" => "test"} | |
# here, but it's actually {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment