4.8 KiB
-
Remove 'cow' => 'kine' irregular inflection from default inflections.
Andrew White
-
Add
DateTime#to_s(:iso8601)
andDate#to_s(:iso8601)
for consistency.Andrew White
-
Add
Time#to_s(:iso8601)
for easy conversion of times to the iso8601 format for easy Javascript date parsing.DHH
-
Improve
ActiveSupport::Cache::MemoryStore
cache size calculation. The memory used by a key/entry pair is calculated via#cached_size
:def cached_size(key, entry) key.to_s.bytesize + entry.size + PER_ENTRY_OVERHEAD end
The value of
PER_ENTRY_OVERHEAD
is 240 bytes based on an empirical estimation for 64-bit MRI on 1.9.3 and 2.0. GH#11512Simeon Simeonov
-
Only raise
Module::DelegationError
if it's the source of the exception.Fixes #10559
Andrew White
-
Make
Time.at_with_coercion
retain the second fraction and return local time.Fixes #11350
Neer Friedman, Andrew White
-
Make
HashWithIndifferentAccess#select
always return the hash, even whenHash#select!
returnsnil
, to allow further chaining.Marc Schütz
-
Remove deprecated
String#encoding_aware?
core extensions (core_ext/string/encoding
).Arun Agrawal
-
Remove deprecated
Module#local_constant_names
in favor ofModule#local_constants
.Arun Agrawal
-
Remove deprecated
DateTime.local_offset
in favor ofDateTime.civil_from_fromat
.Arun Agrawal
-
Remove deprecated
Logger
core extensions (core_ext/logger.rb
).Carlos Antonio da Silva
-
Remove deprecated
Time#time_with_datetime_fallback
,Time#utc_time
andTime#local_time
in favor ofTime#utc
andTime#local
.Vipul A M
-
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
-
Remove deprecated
Date#to_time_in_current_zone
in favor ofDate#in_time_zone
.Vipul A M
-
Remove deprecated
Proc#bind
with no replacement.Carlos Antonio da Silva
-
Remove deprecated
Array#uniq_by
andArray#uniq_by!
, use nativeArray#uniq
andArray#uniq!
instead.Carlos Antonio da Silva
-
Remove deprecated
ActiveSupport::BasicObject
, useActiveSupport::ProxyObject
instead.Carlos Antonio da Silva
-
Remove deprecated
BufferedLogger
.Yves Senn
-
Remove deprecated
assert_present
andassert_blank
methods.Yves Senn
-
Fix return value from
BacktraceCleaner#noise
when the cleaner is configured with multiple silencers.Fixes #11030
Mark J. Titorenko
-
HashWithIndifferentAccess#select
now returns aHashWithIndifferentAccess
instance instead of aHash
instance.Fixes #10723
Albert Llop
-
Add
DateTime#usec
andDateTime#nsec
so thatActiveSupport::TimeWithZone
keeps sub-second resolution when wrapping aDateTime
value.Fixes #10855
Andrew White
-
Fix
ActiveSupport::Dependencies::Loadable#load_dependency
calling#blame_file!
on Exceptions that do not have the Blamable mixinAndrew Kreiling
-
Override
Time.at
to support the passing of Time-like values when called with a single argument.Andrew White
-
Prevent side effects to hashes inside arrays when
Hash#with_indifferent_access
is called.Fixes #10526
Yves Senn
-
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
-
Replace
multi_json
withjson
.Since Rails requires Ruby 1.9 and since Ruby 1.9 includes
json
in the standard library,multi_json
is no longer necessary.Erik Michaels-Ober
-
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.
Mario Caropreso + Viktor Kelemen + zackham
-
Fix skipping object callbacks using metadata fetched via callback chain inspection methods (
_*_callbacks
)Sean Walbran
-
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
Please check 4-0-stable for previous changes.