mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
8ccc3bfc2d
* Without the change the new test fails like this: Failure: ActiveModel::Type::RegistryTest#test_a_class_can_be_registered_for_a_symbol [test/cases/type/registry_test.rb:16]: Expected: [{}, {}] Actual: [nil, nil] * (*args, **kwargs)-delegation is not correct on Ruby 2.7 unless the target always accepts keyword arguments (not the case for `Array.new`). See https://eregon.me/blog/2021/02/13/correct-delegation-in-ruby-2-27-3.html
800 B
800 B
-
Fix delegation in ActiveModel::Type::Registry#lookup
Passing a last positional argument
{}
would be incorrectly considered as keyword argument.Benoit Daloze
-
Cache and re-use generated attribute methods.
Generated methods with identical implementations will now share their instruction sequences leading to reduced memory retention, and slightly faster load time.
Jean Boussier
-
Add
in: range
parameter tonumericality
validator.Michal Papis
-
Add
locale
argument toActiveModel::Name#initialize
to be used to generate thesingular
,plural
,route_key
andsingular_route_key
values.Lukas Pokorny
Please check 6-1-stable for previous changes.