CHANGELOG.md 4.0 KB
Newer Older
1 2 3 4 5 6
*   Make `Time.at_with_coercion` retain the second fraction and offset from UTC.

    Fixes #11350

    *Neer Friedman*, *Andrew White*

7 8 9 10 11
*   Make `HashWithIndifferentAccess#select` always return the hash, even when
    `Hash#select!` returns `nil`, to allow further chaining.

    *Marc Schütz*

12 13 14 15
*   Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`).

    *Arun Agrawal*

16 17 18 19
*   Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants`.

    *Arun Agrawal*

20 21 22 23
*   Remove deprecated `DateTime.local_offset` in favor of `DateTime.civil_from_fromat`.

    *Arun Agrawal*

24 25 26 27
*   Remove deprecated `Logger` core extensions (`core_ext/logger.rb`).

    *Carlos Antonio da Silva*

28 29 30 31 32
*   Remove deprecated `Time#time_with_datetime_fallback`, `Time#utc_time`
    and `Time#local_time` in favor of `Time#utc` and `Time#local`.

    *Vipul A M*

33 34 35 36 37 38 39
*   Remove deprecated `Hash#diff` with no replacement.

    If you're using it to compare hashes for the purpose of testing, please use
    MiniTest's `assert_equal` instead.

    *Carlos Antonio da Silva*

40
*   Remove deprecated `Date#to_time_in_current_zone` in favor of `Date#in_time_zone`.
41 42 43

    *Vipul A M*

44 45 46 47
*   Remove deprecated `Proc#bind` with no replacement.

    *Carlos Antonio da Silva*

48 49 50 51 52
*   Remove deprecated `Array#uniq_by` and `Array#uniq_by!`, use native
    `Array#uniq` and `Array#uniq!` instead.

    *Carlos Antonio da Silva*

53 54 55 56
*   Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead.

    *Carlos Antonio da Silva*

Y
Yves Senn 已提交
57 58 59 60
*   Remove deprecated `BufferedLogger`.

    *Yves Senn*

61 62 63 64
*   Remove deprecated `assert_present` and `assert_blank` methods.

    *Yves Senn*

65 66 67 68 69 70 71
*   Fix return value from `BacktraceCleaner#noise` when the cleaner is configured
    with multiple silencers.

    Fixes #11030

    *Mark J. Titorenko*

72
*   `HashWithIndifferentAccess#select` now returns a `HashWithIndifferentAccess`
73 74 75 76 77 78
    instance instead of a `Hash` instance.

    Fixes #10723

    *Albert Llop*

79 80
*   Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone` keeps
    sub-second resolution when wrapping a `DateTime` value.
81

82 83 84 85
    Fixes #10855

    *Andrew White*

86 87 88 89 90
*   Fix `ActiveSupport::Dependencies::Loadable#load_dependency` calling
    `#blame_file!` on Exceptions that do not have the Blamable mixin

    *Andrew Kreiling*

91 92 93 94
*   Override `Time.at` to support the passing of Time-like values when called with a single argument.

    *Andrew White*

95 96
*   Prevent side effects to hashes inside arrays when
    `Hash#with_indifferent_access` is called.
97

98 99 100 101
    Fixes #10526

    *Yves Senn*

102 103 104 105 106 107
*   Raise an error when multiple `included` blocks are defined for a Concern.
    The old behavior would silently discard previously defined blocks, running
    only the last one.

    *Mike Dillon*

108 109
*   Replace `multi_json` with `json`.

110
    Since Rails requires Ruby 1.9 and since Ruby 1.9 includes `json` in the standard library,
111 112 113 114
    `multi_json` is no longer necessary.

    *Erik Michaels-Ober*

115 116 117 118
*   Added escaping of U+2028 and U+2029 inside the json encoder.
    These characters are legal in JSON but break the Javascript interpreter.
    After escaping them, the JSON is still legal and can be parsed by Javascript.

119
    *Mario Caropreso + Viktor Kelemen + zackham*
120

121 122 123 124 125
*   Fix skipping object callbacks using metadata fetched via callback chain
    inspection methods (`_*_callbacks`)

    *Sean Walbran*

126 127 128 129 130 131 132 133 134 135 136 137 138
*   Add a `fetch_multi` method to the cache stores. The method provides
    an easy to use API for fetching multiple values from the cache.

    Example:

        # Calculating scores is expensive, so we only do it for posts
        # that have been updated. Cache keys are automatically extracted
        # from objects that define a #cache_key method.
        scores = Rails.cache.fetch_multi(*posts) do |post|
          calculate_score(post)
        end

    *Daniel Schierbeck*
R
Rafael Mendonça França 已提交
139

140
Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/activesupport/CHANGELOG.md) for previous changes.