aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/ordered_hash.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add a commend about deprecation of ActiveSupport::OrderedHashRafael Mendonça França2015-12-201-1/+1
| | | | | | | It is in the code to provides backward compatibility for people that have this class serialized as YAML in some storage. Closes #22681
* Fix OrderedHash.select to return self instance.Arthur Neves2014-03-071-0/+4
| | | | | | On ruby 2.1.1 the behavior of .select and .reject has changed. They will return a Hash new instance, so we need to override them to keep the instance object class.
* Consistence in the block styleRafael Mendonça França2014-01-171-1/+1
|
* Remove warnings on Ruby 2.1Rafael Mendonça França2014-01-171-0/+4
|
* update AS:OrderedHash docsFrancesco Rodriguez2012-05-161-4/+8
|
* No need to override to_yaml method in ActiveSupport::OrderedHashRafael Mendonça França2012-01-041-15/+0
|
* No need to use rescue block to require psychRafael Mendonça França2012-01-041-5/+1
|
* No need to check if YAML::ENGINE is defined since ruby 1.9 does thatRafael Mendonça França2012-01-041-1/+1
|
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-201-167/+0
| | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome.
* remove nodoc on OrderedHashVijay Dev2011-11-221-1/+1
|
* Make `ActiveSupport::OrderedHash` extractable when using ↵Prem Sichanugrist2011-09-031-0/+5
| | | | | `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.
* Remove unneccesary map chainingGuillermo Iguaran2011-07-231-1/+1
|
* Fixes minor ruby 1.8 inconsistencyAndrew Radev2011-05-271-1/+5
| | | | | ActiveSupport::OrderedHash did not behave identically to Hash when given a block with a splat.
* indifferent access should recurse Hash subclassesDavid Lee2011-05-081-0/+4
| | | | | | | | | | | | | | 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.
* fix OrderedHash#each* methods to return Enumerators when called without a ↵Gabriel Horner2011-02-031-0/+3
| | | | | | block [#6366 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* OrderedHash#each* methods return self like Hash does [#6364 state:resolved]Gabriel Horner2011-02-021-0/+3
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* load psych by default if possibleAaron Patterson2011-01-281-0/+5
|
* test that the custom ordered hash can be round-trippedAaron Patterson2011-01-041-5/+0
|
* require Psych if possible, use Psych output when enabledAaron Patterson2011-01-041-1/+14
|
* OrderedHash#select now preserves order [#5843 state:resolved]James A. Rosen2010-11-071-0/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert "refactor delete a little"Aaron Patterson2010-10-151-1/+4
| | | | This reverts commit f3f34bce8fc2895e05c4a06bb4105d6155fa423d.
* Revert "speeding up flattened version of OrderedHash.[]"Aaron Patterson2010-10-131-2/+3
| | | | This reverts commit 9c53e82d66d0c34b8f35609b7972f28521d5794d.
* speeding up flattened version of OrderedHash.[]Aaron Patterson2010-10-131-3/+2
|
* refactor delete a littleAaron Patterson2010-10-131-4/+1
|
* use unless instead of if !Aaron Patterson2010-10-131-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-2/+2
| | | | 's/[ \t]*$//' -i {} \;)
* commit review: say clearly that AS::OrderedHash is about insertion order, be ↵Xavier Noria2010-08-061-8/+10
| | | | more neutral in wording, do not imply lack of ordering is a problem
* adding documentation for OrderedHash and OrderedOptionsNeeraj Singh2010-08-061-1/+8
|
* Add OrderedHash#invert to preserve order in ruby 1.8 [#4875]chaitanyav2010-06-261-0/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Alias ActiveSupport::OrderedHash#update to ActiveSupport::OrderedHash.merge!Paul Mucur2010-06-251-0/+2
| | | | | | | | 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>
* explains why AS::OrderedHash does not leverage inheritanceXavier Noria2010-06-131-0/+11
|
* Change implementation to do it without asking each time for block_given?Santiago Pastorino2010-06-131-6/+4
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* revises implementation of AS::OrderedHash#merge!Xavier Noria2010-06-131-4/+6
|
* Revert "hash merging with a block ignores non-existing keys altogether"Xavier Noria2010-06-131-1/+1
| | | | | | This reverts commit 72f9fec607c4a72b2e88995d0cb32b16b96e9068. It is wrong, this feature is a little undocumented, doing some research.
* hash merging with a block ignores non-existing keys altogetherXavier Noria2010-06-131-1/+1
|
* Support passing a block to ActiveSupport::OrderedHash's merge and merge! ↵Paul Mucur2010-06-131-3/+7
| | | | | | | | [#4838 state:committed] For better consistency with Ruby's own Hash implementation. Signed-off-by: Xavier Noria <fxn@hashref.com>
* Refactor for readabilityJeremy Kemper2010-04-091-30/+24
|
* active_support/ordered_hash now requires yamlsnusnu2010-01-271-0/+2
|
* Adding custom yaml (de-)serialization for OrderedHashGregor Schmidt2010-01-271-1/+22
| | | | | | [#3608 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix OrderedHash#replaceChris Hapgood2009-11-051-0/+7
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fixed ActiveSupport::OrderedHash::[] work identically to ::Hash::[] in ruby ↵Brian Abreu2009-07-021-4/+18
| | | | | | 1.8.7 [#2832 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* ActiveSupport::OrderedHash[1,2,3,4] creates an OrderedHash instead of a Hash.Douglas F Shearer2009-05-111-0/+10
| | | | | | [#2615 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ActiveSupport::OrderedHash#to_a method returns an ordered set of arrays. ↵Ken Collins2009-05-101-0/+4
| | | | | | | Matches ruby1.9's Hash#to_a. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2629 state:committed]