activemodel 8.1.2.1 → 8.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7d64f9c0fada4afc52f06c6b1e86cea5506c3c0e5bbb62007240efaa9635f5d
4
- data.tar.gz: 73f7293af65afdd7e75dc8403f0625787c6e0e911ac629e689bd47576b995192
3
+ metadata.gz: 6f7d8fbb4c4137982a3ccb5521f42a84a3456b4c2502ed639da79b7d7587b6de
4
+ data.tar.gz: 3f0d1b35fcc14b77642ee595bd681a8a666c8e925d0d9e3d4f090a256549a922
5
5
  SHA512:
6
- metadata.gz: 7bebff0c62141aa5ae3aa8983b261dc35634d2f3ae2266504a7f0bfc6184558bc2860d487ae452ffab1ed548fcf84e9442eebec4682cec2ec69bde83bd672370
7
- data.tar.gz: 13f68620adf0b69c15818c6e290f589e263d33cdf608bb82c50928cc63c2a20ee27fb7b8f6df543e501ecb16e10dea02a409f7759a54db3e197d59bc50e2c3ff
6
+ metadata.gz: b5a74d83ab02559e2aff05ccbcc3076ac618e26c8aeb8927701caee22a7aea360448f38e16b9469d9b17c71c8d0ebbb81dc87c550c365bb9a5a435891cb31054
7
+ data.tar.gz: 9b9eff19887f81221fde407bc4e4233cf0e3ab03534778d8aba2ae614ab55b0c0a0d6adf9b7755242416709cc9389c696967299b4be77cf69728a3eccbc9a423
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## Rails 8.1.3 (March 24, 2026) ##
2
+
3
+ * Fix Ruby 4.0 delegator warning when calling inspect on attributes.
4
+
5
+ *Hammad Khan*
6
+
7
+ * Fix `NoMethodError` when deserialising `Type::Integer` objects marshalled under Rails 8.0.
8
+
9
+ The performance optimisation that replaced `@range` with `@max`/`@min`
10
+ broke Marshal compatibility. Objects serialised under 8.0 (with `@range`)
11
+ and deserialised under 8.1 (expecting `@max`/`@min`) would crash with
12
+ `undefined method '<=' for nil` because `Marshal.load` restores instance
13
+ variables without calling `initialize`.
14
+
15
+ *Edward Woodcock*
16
+
17
+
1
18
  ## Rails 8.1.2.1 (March 23, 2026) ##
2
19
 
3
20
  * No changes.
@@ -183,6 +183,11 @@ module ActiveModel
183
183
  define_method(:inspect, Kernel.instance_method(:inspect))
184
184
 
185
185
  private
186
+ # Prevent Ruby 4.0 "delegator does not forward private method" warning.
187
+ # Kernel#inspect calls instance_variables_to_inspect which, without this,
188
+ # triggers Delegator#respond_to_missing? for a private method.
189
+ define_method(:instance_variables_to_inspect, Kernel.instance_method(:instance_variables))
190
+
186
191
  def normalize(value)
187
192
  normalizer.call(value) unless value.nil? && !normalize_nil?
188
193
  end
@@ -9,8 +9,8 @@ module ActiveModel
9
9
  module VERSION
10
10
  MAJOR = 8
11
11
  MINOR = 1
12
- TINY = 2
13
- PRE = "1"
12
+ TINY = 3
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -102,6 +102,10 @@ module ActiveModel
102
102
 
103
103
  private
104
104
  def out_of_range?(value)
105
+ if @max.nil?
106
+ @max = max_value
107
+ @min = min_value
108
+ end
105
109
  value && (@max <= value || @min > value)
106
110
  end
107
111
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.2.1
4
+ version: 8.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 8.1.2.1
18
+ version: 8.1.3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 8.1.2.1
25
+ version: 8.1.3
26
26
  description: A toolkit for building modeling frameworks like Active Record. Rich support
27
27
  for attributes, callbacks, validations, serialization, internationalization, and
28
28
  testing.
@@ -113,10 +113,10 @@ licenses:
113
113
  - MIT
114
114
  metadata:
115
115
  bug_tracker_uri: https://github.com/rails/rails/issues
116
- changelog_uri: https://github.com/rails/rails/blob/v8.1.2.1/activemodel/CHANGELOG.md
117
- documentation_uri: https://api.rubyonrails.org/v8.1.2.1/
116
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.3/activemodel/CHANGELOG.md
117
+ documentation_uri: https://api.rubyonrails.org/v8.1.3/
118
118
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
119
- source_code_uri: https://github.com/rails/rails/tree/v8.1.2.1/activemodel
119
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.3/activemodel
120
120
  rubygems_mfa_required: 'true'
121
121
  rdoc_options: []
122
122
  require_paths: