CHANGELOG
Rails 7.2.2.1 (December 10, 2024)¶
- No changes.
Rails 7.2.2 (October 30, 2024)¶
-
Include options when instrumenting
ActiveSupport::Cache::Store#deleteandActiveSupport::Cache::Store#delete_multi.Adam Renberg Tamm
-
Print test names when running
rails test -vfor parallel tests.John Hawthorn, Abeid Ahmed
Rails 7.2.1.2 (October 23, 2024)¶
- No changes.
Rails 7.2.1.1 (October 15, 2024)¶
- No changes.
Rails 7.2.1 (August 22, 2024)¶
- No changes.
Rails 7.2.0 (August 09, 2024)¶
- Fix
delegate_missing_to allow_nil: truewhen called with implict self
class Person
delegate_missing_to :address, allow_nil: true
def address
nil
end
def berliner?
city == "Berlin"
end
end
Person.new.city # => nil
Person.new.berliner? # undefined local variable or method `city' for an instance of Person (NameError)
*Jean Boussier*
-
Add
loggeras a dependency since it is a bundled gem candidate for Ruby 3.5Earlopain
-
Define
Digest::UUID.nil_uuid, which returns the so-called nil UUID.Xavier Noria
-
Support
durationtype inActiveSupport::XmlMini.heka1024
-
Remove deprecated
ActiveSupport::Notifications::Event#childrenandActiveSupport::Notifications::Event#parent_of?.Rafael Mendonça França
-
Remove deprecated support to call the following methods without passing a deprecator:
deprecatedeprecate_constantActiveSupport::Deprecation::DeprecatedObjectProxy.newActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.newActiveSupport::Deprecation::DeprecatedConstantProxy.newassert_deprecatedassert_not_deprecatedcollect_deprecations
Rafael Mendonça França
-
Remove deprecated
ActiveSupport::Deprecationdelegation to instance.Rafael Mendonça França
-
Remove deprecated
SafeBuffer#clone_empty.Rafael Mendonça França
-
Remove deprecated
#to_default_sfromArray,Date,DateTimeandTime.Rafael Mendonça França
-
Remove deprecated support to passing
Dalli::Clientinstances toMemCacheStore.Rafael Mendonça França
-
Remove deprecated
config.active_support.use_rfc4122_namespaced_uuids.Rafael Mendonça França
-
Remove deprecated
config.active_support.remove_deprecated_time_with_zone_name.Rafael Mendonça França
-
Remove deprecated
config.active_support.disable_to_s_conversion.Rafael Mendonça França
-
Remove deprecated support to bolding log text with positional boolean in
ActiveSupport::LogSubscriber#color.Rafael Mendonça França
-
Remove deprecated constants
ActiveSupport::LogSubscriber::CLEARandActiveSupport::LogSubscriber::BOLD.Rafael Mendonça França
-
Remove deprecated support for
config.active_support.cache_format_version = 6.1.Rafael Mendonça França
-
Remove deprecated
:pool_sizeand:pool_timeoutoptions for the cache storage.Rafael Mendonça França
-
Warn on tests without assertions.
ActiveSupport::TestCasenow warns when tests do not run any assertions. This is helpful in detecting broken tests that do not perform intended assertions.fatkodima
-
Support
hexBinarytype inActiveSupport::XmlMini.heka1024
-
Deprecate
ActiveSupport::ProxyObjectin favor of Ruby's built-inBasicObject.Earlopain
-
stub_constnow accepts aexists: falseparameter to allow stubbing missing constants.Jean Boussier
-
Make
ActiveSupport::BacktraceCleanercopy filters and silencers on dup and clone.Previously the copy would still share the internal silencers and filters array, causing state to leak.
Jean Boussier
-
Updating Astana with Western Kazakhstan TZInfo identifier.
Damian Nelson
-
Add filename support for
ActiveSupport::Logger.logger_outputs_to?.
logger = Logger.new('/var/log/rails.log')
ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log')
*Christian Schmidt*
-
Include
IPAddr#prefixwhen serializing anIPAddrusing theActiveSupport::MessagePackserializer.This change is backward and forward compatible — old payloads can still be read, and new payloads will be readable by older versions of Rails.
Taiki Komaba
-
Add
default:support forActiveSupport::CurrentAttributes.attribute.
class Current < ActiveSupport::CurrentAttributes
attribute :counter, default: 0
end
*Sean Doyle*
- Yield instance to
Object#withblock.
client.with(timeout: 5_000) do |c|
c.get("/commits")
end
*Sean Doyle*
-
Use logical core count instead of physical core count to determine the default number of workers when parallelizing tests.
Jonathan Hefner
-
Fix
Time.now/DateTime.now/Date.todayto return results in a system timezone after#travel_to.There is a bug in the current implementation of #travel_to: it remembers a timezone of its argument, and all stubbed methods start returning results in that remembered timezone. However, the expected behavior is to return results in a system timezone.
Aleksei Chernenkov
-
Add
ErrorReported#unexpectedto report precondition violations.For example:
def edit
if published?
Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible")
return false
end
# ...
end
The above will raise an error in development and test, but only report the error in production.
*Jean Boussier*
-
Make the order of read_multi and write_multi notifications for
Cache::Store#fetch_multioperations match the order they are executed in.Adam Renberg Tamm
-
Make return values of
Cache::Store#writeconsistent.The return value was not specified before. Now it returns
trueon a successful write,nilif there was an error talking to the cache backend, andfalseif the write failed for another reason (e.g. the key already exists andunless_exist: truewas passed).Sander Verdonschot
-
Fix logged cache keys not always matching actual key used by cache action.
Hartley McGuire
-
Improve error messages of
assert_changesandassert_no_changes.assert_changeserror messages now display objects with.inspectto make it easier to differentiate nil from empty strings, strings from symbols, etc.assert_no_changeserror messages now surface the actual value.pcreux
-
Fix
#to_fs(:human_size)to correctly work with negative numbers.Earlopain
-
Fix
BroadcastLogger#dupso that it duplicates the logger'sbroadcasts.Andrew Novoselac
-
Fix issue where
bootstrap.rboverwrites thelevelof aBroadcastLogger'sbroadcasts.Andrew Novoselac
-
Fix compatibility with the
semantic_loggergem.The
semantic_loggergem doesn't behave exactly like stdlib logger in thatSemanticLogger#levelreturns a Symbol while stdlibLogger#levelreturns an Integer.This caused the various
LogSubscriberclasses in Rails to break when assigned aSemanticLoggerinstance.Jean Boussier, ojab
-
Fix MemoryStore to prevent race conditions when incrementing or decrementing.
Pierre Jambet
-
Implement
HashWithIndifferentAccess#to_proc.Previously, calling
#to_proconHashWithIndifferentAccessobject used inherited#to_procmethod from theHashclass, which was not able to access values using indifferent keys.fatkodima
Please check 7-1-stable for previous changes.