aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys methods ↵Mark McSpadden2012-05-231-0/+15
| | | | to use them.
* changed xml type datetime to dateTime, fixes #6328Angelo capilleri2012-05-231-2/+2
| | | | | | | | | XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime could be better change this to 'dateTime' with upper case letter 'T. So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime' add the changing to the changelog
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-121-2/+2
|\ | | | | | | | | Conflicts: activesupport/lib/active_support/callbacks.rb
| * Fix copypaste. [ci skip]Edward Tsech2012-05-111-2/+2
| |
* | Test Hash#except can receive more than one argument.Edward Tsech2012-05-111-0/+6
|/
* Nice logic for deep_dup in railsAlexey Gaziev2012-05-061-15/+0
|
* fix HashWithIndifferentAccess.[] methodSergey Nartimov2012-03-231-0/+9
|
* Remove warning of unused variableRafael Mendonça França2012-03-081-1/+1
|
* refactor Hash#slice and Hash#extract!Vasiliy Ermolovich2012-03-061-0/+7
|
* remove usages of AS::OrderedHashVishnu Atrai2012-03-031-1/+1
|
* use AS::TestCase as the base classAaron Patterson2012-01-051-3/+3
|
* Initial pass at removing dead 1.8.x code from Active Support.José Valim2011-12-201-5/+1
| | | | | | 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.
* Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccessMiles Georgi2011-12-111-0/+3
| | | | to return self.
* Fix test to reflect use of to_param for keysbrainopia2011-09-181-8/+8
|
* Issue #636 - Parsing an xml file with multiple records and extra attributes ↵Sidu Ponnappa2011-07-111-0/+49
| | | | (besides type) fails
* Test that HWIA.with_indifferent_access does not return selfDavid Lee2011-05-171-0/+1
|
* Use dup to preserve previous behaviorDavid Lee2011-05-171-1/+1
|
* Optimize parts of HashWithIndifferentAccessDavid Lee2011-05-171-0/+5
|
* indifferent access should recurse Hash subclassesDavid Lee2011-05-081-3/+12
| | | | | | | | | | | | | | 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 bug with empty CDATA not being handled in Hash.from_xmlBradley Harris2011-04-291-2/+2
|
* Added test for empty CDATA bug in from_xmlBradley Harris2011-04-291-2/+8
|
* attributes no longer disappear if a tag contains whitespaceAndre Arko2011-04-141-0/+9
| | | | | | | | | | old: Hash.from_xml("<tag foo='bar'>\n</tag>") => {"tag"=>"\n"} new: Hash.from_xml("<tag foo='bar'>\n</tag>") => {"tag"=>{"foo"=>"bar", "__content__"=>"\n"}
* Fixed various isolated test missing requires within AS.Josh Kalderimis2011-01-121-0/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Only convert direct hash instances in hash with indifferent access.José Valim2010-11-261-0/+8
|
* HashWithIndifferentAccess should not change the subclass of an arrayLarry Sprock2010-11-141-0/+17
|
* Merge remote branch 'drogus/plugin_new'José Valim2010-11-111-0/+15
|\ | | | | | | | | Conflicts: railties/test/generators/app_generator_test.rb
| * Added Hash#deep_dup function which performs deep duplication on given hashPiotr Sarnacki2010-11-021-0/+15
| |
* | Ensure that HashWithIndifferentAccess duplication preserves class (for ↵laserlemon2010-11-071-1/+14
| | | | | | | | | | | | sublclasses) and default value [#5724 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Allowing to_xml :camelize option to be set to :lower to enable ↵Jeremy Holland2010-11-031-1/+8
|/ | | | lower-camelcase tags [#5903 state:resolved]
* Override #store to be consistent with #[].Andrea Campi2010-10-101-0/+10
| | | | | | [#5775 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* let Hash#to_param and Hash#to_query sort againXavier Noria2010-09-281-3/+7
| | | | | This was a regression introduced in 5c858220085dc4ddc1bec496747059dfbe32f1da. We bring sorting back because people rely on it, eg for constructing consistent cache keys.
* Make assert_valid_keys slightly faster.thedarkone2010-09-271-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-21/+21
| | | | 's/[ \t]*$//' -i {} \;)
* Test Hash#to_param escapes keys and valuesSantiago Pastorino2010-07-221-0/+4
| | | | [#5175]
* Hash#to_param is doesn't use sort anymore, some tests added for Hash#to_paramSantiago Pastorino2010-07-221-0/+25
|
* Remove String#constantize depsJeremy Kemper2010-06-111-7/+8
|
* Change HWIA#stringify_keys to return a HWIA not a HashJeremy Kemper2010-04-221-0/+3
|
* Restore HWIA#stringify_keys! and update changelogJeremy Kemper2010-04-221-3/+3
|
* HWIA delegates to to_hash symbolize_keys and stringify_keys and bang methods ↵Santiago Pastorino2010-04-221-2/+36
| | | | | | are not in the api Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add support for a type=binary with an optional encoding=base64. If the ↵Josh Franklin2010-03-261-1/+3
| | | | | | encoding attribute is absent, the data is considered unencoded. [#2966 state:resolved]
* Fixed some bugs and fixed some tests in new SAX-based XmlMini backends.Willem van Bergen2010-01-011-3/+5
| | | | | | [#3636 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-021-41/+0
|
* Support deep-merging HashWithIndifferentAccess.Andrew Moreland2009-08-091-0/+12
| | | | | | [#2732 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes ↵David Burger2009-08-091-0/+7
| | | | | | [#672 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed Hash#from_xml with keys that are all caps.codebrulee2009-05-041-0/+16
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+2
|
* Explicit test dependenciesJeremy Kemper2009-03-281-0/+1
|
* Only require builder at startup if we need to monkey with its String#to_xs ↵Jeremy Kemper2009-03-211-1/+0
| | | | demands
* Use xmlschema when serializing TimeWithZones to xml [#2223 state:resolved]Jonathan del Strother2009-03-121-0/+9
| | | | | | When using Hash#to_xml, any TimeWithZone objects now use xmlschema (iso8601), rather than a simple TimeWithZone#to_s. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure HWIA#reverse_merge! retrurns HWIA [#421 state:resolved]Bradford Folkens2009-03-121-0/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>