Boolean parser blows up on a Fixnum. Conflicts: activesupport/CHANGELOG.md Conflicts: activesupport/CHANGELOG.md
Avoid raising a NameError on FreeBSD using Date Conflicts: activesupport/CHANGELOG.md
Default I18n.enforce_available_locales to true We will default this option to true from now on to ensure users properly handle their list of available locales whenever necessary. This option was added as a security measure and thus Rails will follow it defaulting to secure option. Also improve the handling of I18n config options in its railtie, taking the new enforce_available_locales option into account, by setting it as the last one in the process. This ensures no other configuration will trigger a deprecation warning due to that setting. Conflicts: actionview/test/abstract_unit.rb activesupport/CHANGELOG.md activesupport/activesupport.gemspec activesupport/lib/active_support/i18n_railtie.rb activesupport/test/abstract_unit.rb guides/source/upgrading_ruby_on_rails.md railties/test/application/initializers/i18n_test.rb
…escriptor_leak Fix issue with Kernel#silence_stream leaking file descriptors Conflicts: activesupport/CHANGELOG.md
Make slice! honor default hash value/proc Conflicts: activesupport/CHANGELOG.md
Changelog entry for pr #11474 Conflicts: activesupport/CHANGELOG.md
…re-cleanup Fix FileStore#cleanup to no longer rely on missing each_key method Conflicts: activesupport/CHANGELOG.md
Previously, an autoloaded constant `HTML::SomeClass` would not be marked as autoloaded by AS::Dependencies. This is because the `#loadable_constants_for_path` method uses `String#camelize` on the inferred file path, which in turn means that, unless otherwise directed, AS::Dependencies watches for loaded constants in the `Html` namespace. By passing the original qualified constant name to `#load_or_require`, this inference step is avoided, and the new constant is picked up in the correct namespace. Conflicts: activesupport/CHANGELOG.md
That is a better name, thanks @jeremy.
See the CHANGELONG message in the patch for further details.
…e::MemoryStore Previously, the cache size of `ActiveSupport::Cache::MemoryStore` was calculated as the sum of the size of its entries, ignoring the size of keys and any data structure overhead. This could lead to the calculated cache size sometimes being 10-100x smaller than the memory used, e.g., in the case of small values. The size of a key/entry pair is now 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](https://gist.github.com/ssimeonov/6047200) for 64-bit MRI on 1.9.3 and 2.0. Fixes GH#11512 #11512 Conflicts: activesupport/CHANGELOG.md
This fixes situations where nested NoMethodError exceptions are masked by delegations. This would cause confusion especially where there was a problem in the Rails booting process because of a delegation in the routes reloading code. Fixes #10559 (cherry picked from commit 07a4c76) Conflicts: activesupport/CHANGELOG.md
The standard Ruby behavior for Time.at is to return the same type of time when passing an instance of Time as a single argument. Since the an ActiveSupport::TimeWithZone instance may be a different timezone than the system timezone and DateTime just understands offsets the best we can do is to return an instance of Time with the correct offset. It also maintains the correct fractional second value as well. Fixes #11350. Backports: 4842535 1b38737
Conflicts: actionpack/CHANGELOG.md activemodel/CHANGELOG.md activerecord/CHANGELOG.md activesupport/CHANGELOG.md guides/source/getting_started.md railties/CHANGELOG.md
The previous implementation of BacktraceSilencer#noise did not work correctly if more than one silencer was configured -- specifically, it would only return noise which was matched by all silencers. The new implementation is such that anything that has been matched by silencers is removed from the backtrace using Array#- (array difference), ie. we now return all elements within a backtrace that have been matched by any silencer (and are thus removed by #silence). Fixes #11030.
This reverts commit a08d3c9.
Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone` keeps sub-second resolution when wrapping a `DateTime` value. Fixes #10855
…encies::Loadable It is possible under some environments to receive an Exception that is not extended with Blamable (e.g. JRuby). ActiveSupport::Dependencies::Loadable#load_dependency blindly call blame_file! on the exception which throws it's own NoMethodError exception and hides the original Exception. This commit fixes #9521
Time.at allows passing a single Time argument which is then converted to an integer. The conversion code since 1.9.3r429 explicitly checks for an instance of Time so we need to override it to allow DateTime and ActiveSupport::TimeWithZone values.
…Time with Date)
This reverts commit 8e1d3cd. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/callbacks.rb