Skip to content

Commit 8a63fa5

Browse files
authored
Merge pull request rails#54053 from Earlopain/block-warnings
Fix two unused block warnings on Ruby 3.4
2 parents a8b0203 + aac9e42 commit 8a63fa5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

activemodel/lib/active_model/attribute.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def initialize(name, value_before_type_cast, type, original_attribute = nil, val
3838
@value = value unless value.nil?
3939
end
4040

41-
def value
41+
def value(&_)
4242
# `defined?` is cheaper than `||=` when we get back falsy values
4343
@value = type_cast(value_before_type_cast) unless defined?(@value)
4444
@value

activemodel/lib/active_model/type/value.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(precision: nil, limit: nil, scale: nil)
2525
# by the database. For example a boolean type can return +true+ if the
2626
# value parameter is a Ruby boolean, but may return +false+ if the value
2727
# parameter is some other object.
28-
def serializable?(value)
28+
def serializable?(value, &_)
2929
true
3030
end
3131

0 commit comments

Comments
 (0)