aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* We tenderized the wrong method! Object#try already had the yield option, ↵David Heinemeier Hansson2014-08-291-9/+4
| | | | just needed some tenderloving instance_eval to fit the bill
* Use instance_eval on @tenderlove's suggestion :trollface:David Heinemeier Hansson2014-08-291-1/+1
|
* Update examples to show real worthDavid Heinemeier Hansson2014-08-291-1/+10
|
* Added yield to Object#presenceDavid Heinemeier Hansson2014-08-291-0/+6
|
* Follow-up to #16560Robin Dupret2014-08-241-2/+3
| | | | | | | For the sake of backward-compatibility, we need to make #instance_of? return true for Fixnum. On the other hand, the method should still give true for ActiveSupport::Duration itself which was not the case before.
* Define the Duration#instance_of? methodRobin Dupret2014-08-181-1/+6
| | | | | | | | | | | | | Since Duration is extending from ProxyObject which extends itself from BasicObject, the Duration object doesn't respond to the #instance_of? method. Thus, the #method_missing hook get triggered, delegating the method to its `value` attribute. However, Rubinius' #eql? definition relies on #instance_of?, thus this will equal to true with a Fixnum (since its `value` attribute is a Fixnum) while it should not. The previous behavior was wrong anyway, no matter the implementation.
* Fix rounding errors with #travel_to by resetting the usec on any passed time ↵David Heinemeier Hansson2014-08-171-0/+5
| | | | to zero, so we only travel with per-second precision, not anything deeper than that.
* Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
|
* CHANGELOG entry for TestCase.i_suck_and_my_tests_are_order_dependent! fixAkira Matsuda2014-08-121-0/+6
|
* Fix DateTime comparison with DateTime::Infinity objectRafael Mendonça França2014-08-061-0/+4
| | | | Fixes #16406
* Fix AS docs / changelog with wrong method [ci skip]Carlos Antonio da Silva2014-08-051-2/+2
|
* Rename Object#self to Object#itself to have parity with matz sanctioned ↵David Heinemeier Hansson2014-08-011-2/+2
| | | | method name for Ruby 2.2
* Added Object#self which returns the object itselfDavid Heinemeier Hansson2014-08-011-0/+6
|
* Add implicit receiver support to `Object#with_options`Pavel Pravosud2014-07-291-0/+5
|
* Fixed a compatibility issue with the `Oj` gemGodfrey Chan2014-07-291-0/+7
| | | | | | | | | | | | | `Time#as_json`, `Date#as_json` and `DateTime#as_json` incorrectly depends on a delegation that is set up in `active_support/json/encoding`. We cannot simply require that file in `core_ext/object/json` because it would cause a circular dependency problem (see #12203 for background). We should instead rely on AS's autoload to load that file for us on-demand. To trigger autoload correctly, we need to reference the `AS::JSON::Encoding` constant instead of using the delegated version. Fixes #16131.
* Make HWIA copy the default proc too.Arthur Neves2014-07-241-0/+4
| | | | [fixes #16279]
* Merge pull request #16190 from oss92/word_truncationMatthew Draper2014-07-171-0/+4
|\ | | | | | | Word truncation
| * Added truncate_words method to activesupport stringsroot2014-07-161-0/+4
|/
* Move uuid_v5 and uuid_v3 to Digest::UUIDRafael Mendonça França2014-07-151-1/+1
| | | | | These methods are not random so they should not belings to SecureRandom module.
* Add CHANGELOG entry for #13392 [ci skip]Rafael Mendonça França2014-07-151-0/+7
|
* `DateTime#to_f` now preserves fractional seconds.John Paul Ashenfelter2014-07-021-0/+7
| | | | | | | Previously this method always returns `.0` in the fractional part. This commit changes it to preserve the fractional seconds instead. Fixes #15994.
* Add `Hash#map_values` to ActiveSupportSean Griffin2014-06-291-0/+5
| | | | | Didn't get a chance to convert existing code, I'll skim through the code base to make use of this later this afternoon.
* Quick pass through Active Support and guides CHANGELOGRobin Dupret2014-06-291-0/+2
| | | | [ci skip]
* Merge pull request #15943 from wagenet/cache-instrumentationRafael Mendonça França2014-06-271-0/+7
|\ | | | | | | Always instrument ActiveSupport::Cache
* | Make the apply_inflections method case-sensitiveRobin Dupret2014-06-261-4/+9
|/ | | | | | | | | | | | | | | | | | | Since d3071db1, the apply_inflections method check if the downcased version of a string is contained inside the "whitelist" of uncountable words. However, if the word is composed of capital letters, it won't be matched in the list while it should. We can't simply revert to the previous behavior as there is a performance concern (benchmarked over /usr/share/dict/words): Before d3071db1 135.610000 0.290000 135.900000 (137.807081) Since d3071db1 22.170000 0.020000 22.190000 ( 22.530005) With the patch 22.060000 0.020000 22.080000 ( 22.125771) Benchmarked with http://git.io/aFnWig This way, the solution is to put the down-case version of words inside the @uncountables array.
* Make dependencies.rb add a name to NameErrorArthur Neves2014-06-201-0/+3
|
* Formatting fix in AS changelog [ci skip]Juanjo Bazán2014-06-161-2/+5
|
* fix error with long keys in ActiveSupport::Cache::FileStoreAdam Panzer2014-06-101-0/+3
|
* Merge pull request #15421 from gchan/time_with_zone_precisionMatthew Draper2014-06-051-0/+20
|\ | | | | | | Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lost
| * Fixed `ActiveSupport::TimeWithZone#-` so precision is not unnecessarily lostGordon Chan2014-05-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working with objects with a nanosecond component, the `-` method may unnecessarily cause loss of precision. `ActiveSupport::TimeWithZone#-` should return the same result as if we were using `Time#-`: Time.now.end_of_day - Time.now.beginning_of_day #=> 86399.999999999 Before: Time.zone.now.end_of_day.nsec #=> 999999999 Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86400.0 After: Time.zone.now.end_of_day - Time.zone.now.beginning_of_day #=> 86399.999999999
* | Fix AS::NumberHelper results with rationalsJuanjo Bazán2014-05-311-0/+13
| | | | | | | | | | | | | | | | | | | | :precision was incorrectly being applied to Rationals before: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.3" after: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.33"
* | Tiny formatting fix in AS change log [ci skip]Robin Dupret2014-05-311-4/+4
| |
* | :scissors: removed deprecated `Numeric#ago` and friendsGodfrey Chan2014-05-301-0/+13
|/ | | | | | | | | | | | | | Replacements: 5.ago => 5.seconds.ago 5.until => 5.seconds.until 5.since => 5.seconds.since 5.from_now => 5.seconds.from_now The removed tests does not affect coverage – we have equivalent test cases in the tests for `AS::Duration`. See #12389 for the history and rationale behind this.
* Merge pull request #12080 from ShayDavidson/fix_datetime_partial_datesMatthew Draper2014-05-281-0/+14
|\ | | | | | | Added partial days support to `DateTime`'s `advance` method.
| * Fixed changelogShay Davidson2013-09-021-4/+12
| |
| * Added partial days support to `DateTime`'s `advance` method.Shay Davidson2013-08-301-0/+4
| | | | | | | | | | You can now add partial days (e.g. 2.5.days) to `DateTime` with the advance method. This was acheived by mimicing the `advance` implementation in `Time`.
* | Merge pull request #10887 from sakuro/deep_transform_keys_in_nested_arraysRafael Mendonça França2014-05-201-0/+7
|\ \ | | | | | | | | | | | | | | | | | | Hash#deep_*_keys(!) recurse into nested arrays. Conflicts: activesupport/CHANGELOG.md
| * | Hash#deep_*_keys(!) recurse into nested arrays.OZAWA Sakuro2013-06-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following methods now recursively transform nested arrays, too. * Hash#deep_transform_keys * Hash#deep_transform_keys! * Hash#deep_stringify_keys * Hash#deep_stringify_keys! * Hash#deep_symbolize_keys * Hash#deep_symbolize_keys!
* | | Fix confusing exception in ActiveSupport delegationVladimir Yarotsky2014-05-201-0/+6
| | |
* | | Merge pull request #15037 from ↵Rafael Mendonça França2014-05-161-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | roccoblues/fix_duplicate_activesupport_subscribers Fixed duplicate subscribers in ActiveSupport::Subscriber Conflicts: activesupport/CHANGELOG.md
| * | | Fixed duplicate subscribers in ActiveSupport::SubscriberDennis Schoen2014-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | ActiveSupport::Subscriber no longer creates multiple subscribers when you redefine a method.
* | | | formatting pass through CHANGELOGS. [ci skip]Yves Senn2014-05-161-1/+1
| | | |
* | | | remove deprecation warningeileencodes2014-05-131-0/+4
| | | | | | | | | | | | | | | | | | | | This deprecation was released in 4.1.0 and can be removed for 4.2.0, deprecation message / handling is no longer necessary.
* | | | Use block parameter rather than `$1` during `gsub!` so ↵Mark J. Titorenko2014-05-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | `ActiveSupport::SafeBuffer` values aren't mangled. Fixes #15064
* | | | Make TimeZone#parse behave more like Time#parse.Ulysse Carion2014-05-111-0/+6
|/ / / | | | | | | | | | | | | Namely, if the mday is omitted but any other upper components are, then instead of supplying the mday from the current time, it defaults to 1.
* | | several enhancements to humanize [closes #12288]Xavier Noria2014-05-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Strips leading underscores. * Changes some unnecessary gsub!s to sub!s. * Replaces some anchors ^, $ with \A, \z. * Documents that human inflection rules are applied. * Documents that words are downcased except acronyms. * Adds an example with an acronym. * Rewords docs.
* | | Improve CHANGELOG [ci skip]Rafael Mendonça França2014-05-041-2/+2
| | |
* | | [Fixes #14948] Hash#to_query: Changed a way how empty hash and empty array ↵Bogdan Gusiev2014-05-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are serialized Empty Hash or Array should not present in serialization result {a: []}.to_query # => "" {a: {}}.to_query # => "" For more info see #14948.
* | | Merge branch 'master' into rm-uuid-fixturesRafael Mendonça França2014-04-101-0/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * | | Fixed problem where `1.day.eql?(1.day)` is falseEmily Dobervich2014-04-081-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: 1.second.eql?(1.second) #=> false The new `eql?` requires that `other` is an `ActiveSupport::Duration`. This requirement makes `ActiveSupport::Duration`'s behavior consistent with other numeric types in Ruby. 1.eql?(1.0) #=> false 1.0.eql?(1) #=> false 1.second.eql?(1) #=> false (was true) 1.eql?(1.second) #=> false { 1 => "foo", 1.0 => "bar" } #=> { 1 => "foo", 1.0 => "bar" } { 1 => "foo", 1.second => "bar" } # now => { 1 => "foo", 1.second => "bar" } # was => { 1 => "bar" } And though the behavior here hasn't changed, for reference: 1 == 1.0 #=> true 1.0 == 1 #=> true 1 == 1.second #=> true 1.second == 1 #=> true