| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Ruby 1.9 added Hash#select! and return a hash from Hash#select
whereas Ruby 1.8 returned an array.
|
|
|
|
|
|
| |
In Ruby 2.1.1 and later select and reject return a new instance of
Hash rather than the subclass so we need to override them to return
an instance of the correct class.
|
|
|
|
| |
No sense over-testing this MRI-specific behavior. See ruby/ruby@8d6add973ebcb3b4c1efbfaf07786550a3e219af
|
|
|
|
|
| |
`Array#extract_options!`
`ActiveSupport::OrderedHash` is actually a subclass of the hash, so it does make sense that it should be extractable from the array list.
|
|
|
|
|
| |
ActiveSupport::OrderedHash did not behave identically to Hash when given
a block with a splat.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes Hash subclasses convert to HWIA by default for nested
objects of subclasses of Hash, but allows certain subclasses to prevent nested
conversion by introducing Hash#nested_under_indifferent_access that subclasses
can overwrite.
ActiveSupport::OrderedHash is one such subclass that overwrites
+nested_under_indifferent_access+, since implicitly converting it to HWIA would
remove the ordering of keys and values in Ruby 1.8.
This change is necessary because commit ce9456e broke nested indifferent access
conversion for all subclasses of Hash.
|
| |
|
|
|
|
|
|
| |
block [#6366 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
[#5601 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
bit the code
|
| |
|
|
|
|
|
|
| |
returned (the test would pass for an array and would pass by chance for hashes).
[#4875 state:resolved]
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
| |
all Ruby core classes.
This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized.
So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
|
|
|
|
|
|
|
|
| |
This ensures that an OrderedHash's keys are set up appropriately when using update.
[#4973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
|
|
| |
This reverts commit 72f9fec607c4a72b2e88995d0cb32b16b96e9068.
It is wrong, this feature is a little undocumented, doing some research.
|
| |
|
|
|
|
| |
Signed-off-by: Xavier Noria <fxn@hashref.com>
|
|
|
|
|
|
|
|
| |
[#4838 state:committed]
For better consistency with Ruby's own Hash implementation.
Signed-off-by: Xavier Noria <fxn@hashref.com>
|
|
|
|
|
|
| |
[#3608 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
|
|
| |
1.8.7 [#2832 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
|
|
|
|
|
|
| |
[#2615 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
|
| |
Matches ruby1.9's Hash#to_a.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2629 state:committed]
|
| |
|
|
|
|
| |
default value
|
|
|
|
|
|
| |
state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
|
|
|
|
|
|
| |
[#1559 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
|
|
| |
did not sync the @keys after the operation.
This probably holds true for other mutating methods as well.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
|
|
| |
[#1352 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
ActiveSupport::OrderedHash#each_value [#1410 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
|
|
| |
state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|