Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-activesupport-8.0 for
openSUSE:Factory checked in at 2025-10-10 17:12:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-8.0 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activesupport-8.0.new.5300 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activesupport-8.0"
Fri Oct 10 17:12:10 2025 rev:5 rq:1310571 version:8.0.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activesupport-8.0/rubygem-activesupport-8.0.changes
2025-08-22 17:50:59.075900827 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-activesupport-8.0.new.5300/rubygem-activesupport-8.0.changes
2025-10-10 17:13:46.816431190 +0200
@@ -1,0 +2,6 @@
+Tue Sep 23 00:16:39 UTC 2025 - Marcus Rueckert <[email protected]>
+
+- Update to version 8.0.3:
+ https://rubyonrails.org/2025/9/22/Rails-Version-8-0-3-has-been-released
+
+-------------------------------------------------------------------
Old:
----
activesupport-8.0.2.1.gem
New:
----
activesupport-8.0.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activesupport-8.0.spec ++++++
--- /var/tmp/diff_new_pack.ZX04uJ/_old 2025-10-10 17:13:47.276450554 +0200
+++ /var/tmp/diff_new_pack.ZX04uJ/_new 2025-10-10 17:13:47.276450554 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-activesupport-8.0
-Version: 8.0.2.1
+Version: 8.0.3
Release: 0
%define mod_name activesupport
%define mod_full_name %{mod_name}-%{version}
++++++ activesupport-8.0.2.1.gem -> activesupport-8.0.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 1980-01-02 01:00:00.000000000 +0100
+++ new/CHANGELOG.md 1980-01-02 01:00:00.000000000 +0100
@@ -1,9 +1,58 @@
-## Rails 8.0.2.1 (August 13, 2025) ##
+## Rails 8.0.3 (September 22, 2025) ##
-* No changes.
+* `ActiveSupport::FileUpdateChecker` does not depend on `Time.now` to
prevent unnecessary reloads with time travel test helpers
+
+ *Jan Grodowski*
+
+* Fix `ActiveSupport::BroadcastLogger` from executing a block argument for
each logger (tagged, info, etc.).
+
+ *Jared Armstrong*
+
+* Make `ActiveSupport::Logger` `#freeze`-friendly.
+
+ *Joshua Young*
+
+* Fix `ActiveSupport::HashWithIndifferentAccess#transform_keys!` removing
defaults.
+
+ *Hartley McGuire*
+
+* Fix `ActiveSupport::HashWithIndifferentAccess#tranform_keys!` to handle
collisions.
+
+ If the transformation would result in a key equal to another not yet
transformed one,
+ it would result in keys being lost.
+
+ Before:
+ ```ruby
+ >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
+ => {"c" => 1}
+ ```
-## Rails 8.0.2 (March 12, 2025) ##
+ After:
+
+ ```ruby
+ >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
+ => {"c" => 1, "d" => 2}
+ ```
+
+ *Jason T Johnson*, *Jean Boussier*
+
+* Fix `ActiveSupport::Cache::MemCacheStore#read_multi` to handle network
errors.
+
+ This method specifically wasn't handling network errors like other
codepaths.
+
+ *Alessandro Dal Grande*
+
+* Fix configuring `RedisCacheStore` with `raw: true`.
+
+ *fatkodima*
+
+* Fix `Enumerable#sole` for infinite collections.
+
+ *fatkodima*
+
+
+## Rails 8.0.2.1 (August 13, 2025) ##
* No changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc 1980-01-02 01:00:00.000000000 +0100
+++ new/README.rdoc 1980-01-02 01:00:00.000000000 +0100
@@ -35,6 +35,6 @@
* https://github.com/rails/rails/issues
-Feature requests should be discussed on the rails-core mailing list here:
+Feature requests should be discussed on the rubyonrails-core forum here:
* https://discuss.rubyonrails.org/c/rubyonrails-core
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/broadcast_logger.rb
new/lib/active_support/broadcast_logger.rb
--- old/lib/active_support/broadcast_logger.rb 1980-01-02 01:00:00.000000000
+0100
+++ new/lib/active_support/broadcast_logger.rb 1980-01-02 01:00:00.000000000
+0100
@@ -76,7 +76,6 @@
# Returns all the logger that are part of this broadcast.
attr_reader :broadcasts
- attr_reader :formatter
attr_accessor :progname
def initialize(*loggers)
@@ -105,62 +104,36 @@
@broadcasts.delete(logger)
end
- def level
- @broadcasts.map(&:level).min
- end
-
- def <<(message)
- dispatch { |logger| logger.<<(message) }
- end
-
- def add(...)
- dispatch { |logger| logger.add(...) }
- end
- alias_method :log, :add
-
- def debug(...)
- dispatch { |logger| logger.debug(...) }
- end
-
- def info(...)
- dispatch { |logger| logger.info(...) }
- end
-
- def warn(...)
- dispatch { |logger| logger.warn(...) }
- end
-
- def error(...)
- dispatch { |logger| logger.error(...) }
- end
-
- def fatal(...)
- dispatch { |logger| logger.fatal(...) }
- end
-
- def unknown(...)
- dispatch { |logger| logger.unknown(...) }
- end
-
- def formatter=(formatter)
- dispatch { |logger| logger.formatter = formatter }
-
- @formatter = formatter
- end
-
- def level=(level)
- dispatch { |logger| logger.level = level }
- end
- alias_method :sev_threshold=, :level=
-
def local_level=(level)
- dispatch do |logger|
+ @broadcasts.each do |logger|
logger.local_level = level if logger.respond_to?(:local_level=)
end
end
- def close
- dispatch { |logger| logger.close }
+ def local_level
+ loggers = @broadcasts.select { |logger| logger.respond_to?(:local_level)
}
+
+ loggers.map do |logger|
+ logger.local_level
+ end.first
+ end
+
+ LOGGER_METHODS = %w[
+ << log add debug info warn error fatal unknown
+ level= sev_threshold= close
+ formatter formatter=
+ ] # :nodoc:
+ LOGGER_METHODS.each do |method|
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
+ def #{method}(...)
+ dispatch(:#{method}, ...)
+ end
+ RUBY
+ end
+
+ # Returns the lowest level of all the loggers in the broadcast.
+ def level
+ @broadcasts.map(&:level).min
end
# True if the log level allows entries with severity +Logger::DEBUG+ to be
written
@@ -171,7 +144,7 @@
# Sets the log level to +Logger::DEBUG+ for the whole broadcast.
def debug!
- dispatch { |logger| logger.debug! }
+ dispatch(:debug!)
end
# True if the log level allows entries with severity +Logger::INFO+ to be
written
@@ -182,7 +155,7 @@
# Sets the log level to +Logger::INFO+ for the whole broadcast.
def info!
- dispatch { |logger| logger.info! }
+ dispatch(:info!)
end
# True if the log level allows entries with severity +Logger::WARN+ to be
written
@@ -193,7 +166,7 @@
# Sets the log level to +Logger::WARN+ for the whole broadcast.
def warn!
- dispatch { |logger| logger.warn! }
+ dispatch(:warn!)
end
# True if the log level allows entries with severity +Logger::ERROR+ to be
written
@@ -204,7 +177,7 @@
# Sets the log level to +Logger::ERROR+ for the whole broadcast.
def error!
- dispatch { |logger| logger.error! }
+ dispatch(:error!)
end
# True if the log level allows entries with severity +Logger::FATAL+ to be
written
@@ -215,21 +188,35 @@
# Sets the log level to +Logger::FATAL+ for the whole broadcast.
def fatal!
- dispatch { |logger| logger.fatal! }
+ dispatch(:fatal!)
end
def initialize_copy(other)
@broadcasts = []
@progname = other.progname.dup
- @formatter = other.formatter.dup
broadcast_to(*other.broadcasts.map(&:dup))
end
private
- def dispatch(&block)
- @broadcasts.each { |logger| block.call(logger) }
- true
+ def dispatch(method, *args, **kwargs, &block)
+ if block_given?
+ # Maintain semantics that the first logger yields the block
+ # as normal, but subsequent loggers won't re-execute the block.
+ # Instead, the initial result is immediately returned.
+ called, result = false, nil
+ block = proc { |*args, **kwargs|
+ if called then result
+ else
+ called = true
+ result = yield(*args, **kwargs)
+ end
+ }
+ end
+
+ @broadcasts.map { |logger|
+ logger.send(method, *args, **kwargs, &block)
+ }.first
end
def method_missing(name, ...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache/mem_cache_store.rb
new/lib/active_support/cache/mem_cache_store.rb
--- old/lib/active_support/cache/mem_cache_store.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/cache/mem_cache_store.rb 1980-01-02
01:00:00.000000000 +0100
@@ -212,26 +212,24 @@
def read_multi_entries(names, **options)
keys_to_names = names.index_by { |name| normalize_key(name, options)
}
- raw_values = begin
- @data.with { |c| c.get_multi(keys_to_names.keys) }
- rescue Dalli::UnmarshalError
- {}
- end
+ rescue_error_with({}) do
+ raw_values = @data.with { |c| c.get_multi(keys_to_names.keys) }
- values = {}
+ values = {}
- raw_values.each do |key, value|
- entry = deserialize_entry(value, raw: options[:raw])
+ raw_values.each do |key, value|
+ entry = deserialize_entry(value, raw: options[:raw])
- unless entry.nil? || entry.expired? ||
entry.mismatched?(normalize_version(keys_to_names[key], options))
- begin
- values[keys_to_names[key]] = entry.value
- rescue DeserializationError
+ unless entry.nil? || entry.expired? ||
entry.mismatched?(normalize_version(keys_to_names[key], options))
+ begin
+ values[keys_to_names[key]] = entry.value
+ rescue DeserializationError
+ end
end
end
- end
- values
+ values
+ end
end
# Delete an entry from the cache.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache.rb
new/lib/active_support/cache.rb
--- old/lib/active_support/cache.rb 1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_support/cache.rb 1980-01-02 01:00:00.000000000 +0100
@@ -35,6 +35,7 @@
:race_condition_ttl,
:serializer,
:skip_nil,
+ :raw,
]
# Mapping of canonical option names to aliases that a store will recognize.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/benchmark.rb
new/lib/active_support/core_ext/benchmark.rb
--- old/lib/active_support/core_ext/benchmark.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/benchmark.rb 1980-01-02
01:00:00.000000000 +0100
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "benchmark"
+return if Benchmark.respond_to?(:ms)
class << Benchmark
def ms(&block) # :nodoc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/date_time/conversions.rb
new/lib/active_support/core_ext/date_time/conversions.rb
--- old/lib/active_support/core_ext/date_time/conversions.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/date_time/conversions.rb 1980-01-02
01:00:00.000000000 +0100
@@ -11,7 +11,8 @@
#
# This method is aliased to <tt>to_formatted_s</tt>.
#
- # === Examples
+ # ==== Examples
+ #
# datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec
2007 00:00:00 +0000
#
# datetime.to_fs(:db) # => "2007-12-04 00:00:00"
@@ -23,7 +24,8 @@
# datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000"
# datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00"
#
- # == Adding your own datetime formats to to_fs
+ # ==== Adding your own datetime formats to +to_fs+
+ #
# DateTime formats are shared with Time. You can add your own to the
# Time::DATE_FORMATS hash. Use the format name as the hash key and
# either a strftime string or Proc instance that takes a time or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/enumerable.rb
new/lib/active_support/core_ext/enumerable.rb
--- old/lib/active_support/core_ext/enumerable.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/enumerable.rb 1980-01-02
01:00:00.000000000 +0100
@@ -209,10 +209,22 @@
# Set.new.sole # => Enumerable::SoleItemExpectedError: no item found
# { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple
items found
def sole
- case count
- when 1 then return first # rubocop:disable Style/RedundantReturn
- when 0 then raise
ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "no item found"
- when 2.. then raise
ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "multiple items found"
+ result = nil
+ found = false
+
+ each do |element|
+ if found
+ raise SoleItemExpectedError, "multiple items found"
+ end
+
+ result = element
+ found = true
+ end
+
+ if found
+ result
+ else
+ raise SoleItemExpectedError, "no item found"
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/object/to_query.rb
new/lib/active_support/core_ext/object/to_query.rb
--- old/lib/active_support/core_ext/object/to_query.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/object/to_query.rb 1980-01-02
01:00:00.000000000 +0100
@@ -1,6 +1,7 @@
# frozen_string_literal: true
-require "cgi"
+require "cgi/escape"
+require "cgi/util" if RUBY_VERSION < "3.5"
class Object
# Alias of <tt>to_s</tt>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/object/try.rb
new/lib/active_support/core_ext/object/try.rb
--- old/lib/active_support/core_ext/object/try.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/object/try.rb 1980-01-02
01:00:00.000000000 +0100
@@ -145,14 +145,14 @@
#
# With +try+
# @person.try(:children).try(:first).try(:name)
- def try(*)
+ def try(*, &)
nil
end
# Calling +try!+ on +nil+ always returns +nil+.
#
# nil.try!(:name) # => nil
- def try!(*)
+ def try!(*, &)
nil
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/range/overlap.rb
new/lib/active_support/core_ext/range/overlap.rb
--- old/lib/active_support/core_ext/range/overlap.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/range/overlap.rb 1980-01-02
01:00:00.000000000 +0100
@@ -1,10 +1,10 @@
# frozen_string_literal: true
class Range
- # Compare two ranges and see if they overlap each other
- # (1..5).overlap?(4..6) # => true
- # (1..5).overlap?(7..9) # => false
unless Range.method_defined?(:overlap?) # Ruby 3.3+
+ # Compare two ranges and see if they overlap each other
+ # (1..5).overlap?(4..6) # => true
+ # (1..5).overlap?(7..9) # => false
def overlap?(other)
raise TypeError unless other.is_a? Range
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/range/sole.rb
new/lib/active_support/core_ext/range/sole.rb
--- old/lib/active_support/core_ext/range/sole.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/range/sole.rb 1980-01-02
01:00:00.000000000 +0100
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class Range
+ # Returns the sole item in the range. If there are no items, or more
+ # than one item, raises Enumerable::SoleItemExpectedError.
+ #
+ # (1..1).sole # => 1
+ # (2..1).sole # => Enumerable::SoleItemExpectedError: no item found
+ # (..1).sole # => Enumerable::SoleItemExpectedError: infinite range
cannot represent a sole item
+ def sole
+ if self.begin.nil? || self.end.nil?
+ raise ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "infinite
range '#{inspect}' cannot represent a sole item"
+ end
+
+ super
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/range.rb
new/lib/active_support/core_ext/range.rb
--- old/lib/active_support/core_ext/range.rb 1980-01-02 01:00:00.000000000
+0100
+++ new/lib/active_support/core_ext/range.rb 1980-01-02 01:00:00.000000000
+0100
@@ -4,3 +4,4 @@
require "active_support/core_ext/range/compare_range"
require "active_support/core_ext/range/overlap"
require "active_support/core_ext/range/each"
+require "active_support/core_ext/range/sole"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/string/filters.rb
new/lib/active_support/core_ext/string/filters.rb
--- old/lib/active_support/core_ext/string/filters.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/string/filters.rb 1980-01-02
01:00:00.000000000 +0100
@@ -88,11 +88,11 @@
# characters.
#
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size
- # => 20
+ # # => 20
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize
- # => 80
+ # # => 80
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20)
- # => "🔪🔪🔪🔪…"
+ # # => "🔪🔪🔪🔪…"
#
# The truncated text ends with the <tt>:omission</tt> string, defaulting
# to "…", for a total length not exceeding <tt>truncate_to</tt>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/string/multibyte.rb
new/lib/active_support/core_ext/string/multibyte.rb
--- old/lib/active_support/core_ext/string/multibyte.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/core_ext/string/multibyte.rb 1980-01-02
01:00:00.000000000 +0100
@@ -12,12 +12,12 @@
# class. If the proxy class doesn't respond to a certain method, it's
forwarded to the encapsulated string.
#
# >> "lj".mb_chars.upcase.to_s
- # => "LJ"
+ # # => "LJ"
#
# NOTE: Ruby 2.4 and later support native Unicode case mappings:
#
# >> "lj".upcase
- # => "LJ"
+ # # => "LJ"
#
# == \Method chaining
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/current_attributes.rb
new/lib/active_support/current_attributes.rb
--- old/lib/active_support/current_attributes.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/current_attributes.rb 1980-01-02
01:00:00.000000000 +0100
@@ -108,15 +108,18 @@
# ==== Options
#
# * <tt>:default</tt> - The default value for the attributes. If the
value
- # is a proc or lambda, it will be called whenever an instance is
- # constructed. Otherwise, the value will be duplicated with +#dup+.
- # Default values are re-assigned when the attributes are reset.
+ # is a proc or lambda, it will be called whenever an instance is
+ # constructed. Otherwise, the value will be duplicated with +#dup+.
+ # Default values are re-assigned when the attributes are reset.
def attribute(*names, default: NOT_SET)
invalid_attribute_names = names.map(&:to_sym) & INVALID_ATTRIBUTE_NAMES
if invalid_attribute_names.any?
raise ArgumentError, "Restricted attribute names:
#{invalid_attribute_names.join(", ")}"
end
+ Delegation.generate(singleton_class, names, to: :instance, nilable:
false, signature: "")
+ Delegation.generate(singleton_class, names.map { |n| "#{n}=" }, to:
:instance, nilable: false, signature: "value")
+
ActiveSupport::CodeGenerator.batch(generated_attribute_methods,
__FILE__, __LINE__) do |owner|
names.each do |name|
owner.define_cached_method(name, namespace: :current_attributes)
do |batch|
@@ -134,9 +137,6 @@
end
end
- Delegation.generate(singleton_class, names, to: :instance, nilable:
false, signature: "")
- Delegation.generate(singleton_class, names.map { |n| "#{n}=" }, to:
:instance, nilable: false, signature: "value")
-
self.defaults = defaults.merge(names.index_with { default })
end
@@ -185,9 +185,16 @@
def method_added(name)
super
+
+ # We try to generate instance delegators early to not rely on
method_missing.
return if name == :initialize
+
+ # If the added method isn't public, we don't delegate it.
return unless public_method_defined?(name)
+
+ # If we already have a class method by that name, we don't override
it.
return if singleton_class.method_defined?(name) ||
singleton_class.private_method_defined?(name)
+
Delegation.generate(singleton_class, [name], to: :instance, as:
self, nilable: false)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/file_update_checker.rb
new/lib/active_support/file_update_checker.rb
--- old/lib/active_support/file_update_checker.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/file_update_checker.rb 1980-01-02
01:00:00.000000000 +0100
@@ -120,7 +120,7 @@
# healthy to consider this edge case because with mtimes in the future
# reloading is not triggered.
def max_mtime(paths)
- time_now = Time.now
+ time_now = Time.at(0, Process.clock_gettime(Process::CLOCK_REALTIME,
:nanosecond), :nanosecond)
max_mtime = nil
# Time comparisons are performed with #compare_without_coercion because
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/gem_version.rb
new/lib/active_support/gem_version.rb
--- old/lib/active_support/gem_version.rb 1980-01-02 01:00:00.000000000
+0100
+++ new/lib/active_support/gem_version.rb 1980-01-02 01:00:00.000000000
+0100
@@ -9,8 +9,8 @@
module VERSION
MAJOR = 8
MINOR = 0
- TINY = 2
- PRE = "1"
+ TINY = 3
+ PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/hash_with_indifferent_access.rb
new/lib/active_support/hash_with_indifferent_access.rb
--- old/lib/active_support/hash_with_indifferent_access.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/hash_with_indifferent_access.rb 1980-01-02
01:00:00.000000000 +0100
@@ -262,9 +262,7 @@
# hash[:a][:c] # => "c"
# dup[:a][:c] # => "c"
def dup
- self.class.new(self).tap do |new_hash|
- set_defaults(new_hash)
- end
+ copy_defaults(self.class.new(self))
end
# This method has the same semantics of +update+, except it does not
@@ -338,21 +336,26 @@
NOT_GIVEN = Object.new # :nodoc:
def transform_keys(hash = NOT_GIVEN, &block)
- return to_enum(:transform_keys) if NOT_GIVEN.equal?(hash) &&
!block_given?
- dup.tap { |h| h.transform_keys!(hash, &block) }
+ if NOT_GIVEN.equal?(hash)
+ if block_given?
+ self.class.new(super(&block))
+ else
+ to_enum(:transform_keys)
+ end
+ else
+ self.class.new(super)
+ end
end
def transform_keys!(hash = NOT_GIVEN, &block)
- return to_enum(:transform_keys!) if NOT_GIVEN.equal?(hash) &&
!block_given?
-
- if hash.nil?
- super
- elsif NOT_GIVEN.equal?(hash)
- keys.each { |key| self[yield(key)] = delete(key) }
- elsif block_given?
- keys.each { |key| self[hash[key] || yield(key)] = delete(key) }
+ if NOT_GIVEN.equal?(hash)
+ if block_given?
+ replace(copy_defaults(transform_keys(&block)))
+ else
+ return to_enum(:transform_keys!)
+ end
else
- keys.each { |key| self[hash[key] || key] = delete(key) }
+ replace(copy_defaults(transform_keys(hash, &block)))
end
self
@@ -376,8 +379,7 @@
def to_hash
copy = Hash[self]
copy.transform_values! { |v| convert_value_to_hash(v) }
- set_defaults(copy)
- copy
+ copy_defaults(copy)
end
def to_proc
@@ -413,12 +415,13 @@
end
- def set_defaults(target)
+ def copy_defaults(target)
if default_proc
target.default_proc = default_proc.dup
else
target.default = default
end
+ target
end
def update_with_single_argument(other_hash, block)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/json/decoding.rb
new/lib/active_support/json/decoding.rb
--- old/lib/active_support/json/decoding.rb 1980-01-02 01:00:00.000000000
+0100
+++ new/lib/active_support/json/decoding.rb 1980-01-02 01:00:00.000000000
+0100
@@ -14,11 +14,13 @@
DATETIME_REGEX = /\A(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T
\t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?)\z/
class << self
- # Parses a JSON string (JavaScript Object Notation) into a hash.
+ # Parses a JSON string (JavaScript Object Notation) into a Ruby object.
# See http://www.json.org for more info.
#
# ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}")
- # => {"team" => "rails", "players" => "36"}
+ # # => {"team" => "rails", "players" => "36"}
+ # ActiveSupport::JSON.decode("2.39")
+ # # => 2.39
def decode(json)
data = ::JSON.parse(json, quirks_mode: true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/lazy_load_hooks.rb
new/lib/active_support/lazy_load_hooks.rb
--- old/lib/active_support/lazy_load_hooks.rb 1980-01-02 01:00:00.000000000
+0100
+++ new/lib/active_support/lazy_load_hooks.rb 1980-01-02 01:00:00.000000000
+0100
@@ -53,7 +53,7 @@
# loaded. If the component has already loaded, the block is executed
# immediately.
#
- # Options:
+ # ==== Options
#
# * <tt>:yield</tt> - Yields the object that run_load_hooks to +block+.
# * <tt>:run_once</tt> - Given +block+ will run only once.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/logger_thread_safe_level.rb
new/lib/active_support/logger_thread_safe_level.rb
--- old/lib/active_support/logger_thread_safe_level.rb 1980-01-02
01:00:00.000000000 +0100
+++ new/lib/active_support/logger_thread_safe_level.rb 1980-01-02
01:00:00.000000000 +0100
@@ -7,6 +7,11 @@
module LoggerThreadSafeLevel # :nodoc:
extend ActiveSupport::Concern
+ def initialize(...)
+ super
+ @local_level_key = :"logger_thread_safe_level_#{object_id}"
+ end
+
def local_level
IsolatedExecutionState[local_level_key]
end
@@ -40,8 +45,6 @@
end
private
- def local_level_key
- @local_level_key ||= :"logger_thread_safe_level_#{object_id}"
- end
+ attr_reader :local_level_key
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 1980-01-02 01:00:00.000000000 +0100
+++ new/metadata 1980-01-02 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: activesupport
version: !ruby/object:Gem::Version
- version: 8.0.2.1
+ version: 8.0.3
platform: ruby
authors:
- David Heinemeier Hansson
@@ -329,6 +329,7 @@
- lib/active_support/core_ext/range/conversions.rb
- lib/active_support/core_ext/range/each.rb
- lib/active_support/core_ext/range/overlap.rb
+- lib/active_support/core_ext/range/sole.rb
- lib/active_support/core_ext/regexp.rb
- lib/active_support/core_ext/securerandom.rb
- lib/active_support/core_ext/string.rb
@@ -493,10 +494,10 @@
- MIT
metadata:
bug_tracker_uri: https://github.com/rails/rails/issues
- changelog_uri:
https://github.com/rails/rails/blob/v8.0.2.1/activesupport/CHANGELOG.md
- documentation_uri: https://api.rubyonrails.org/v8.0.2.1/
+ changelog_uri:
https://github.com/rails/rails/blob/v8.0.3/activesupport/CHANGELOG.md
+ documentation_uri: https://api.rubyonrails.org/v8.0.3/
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
- source_code_uri: https://github.com/rails/rails/tree/v8.0.2.1/activesupport
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.3/activesupport
rubygems_mfa_required: 'true'
rdoc_options:
- "--encoding"