diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attributes.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/type/binary.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/attributes.rb b/activemodel/lib/active_model/attributes.rb index 4083bf827b..7d44f7f2a3 100644 --- a/activemodel/lib/active_model/attributes.rb +++ b/activemodel/lib/active_model/attributes.rb @@ -29,7 +29,7 @@ module ActiveModel private def define_method_attribute=(name) - safe_name = name.unpack("h*".freeze).first + safe_name = name.unpack1("h*".freeze) ActiveModel::AttributeMethods::AttrNames.set_name_cache safe_name, name generated_attribute_methods.module_eval <<-STR, __FILE__, __LINE__ + 1 diff --git a/activemodel/lib/active_model/type/binary.rb b/activemodel/lib/active_model/type/binary.rb index dc2eca18be..76203c5a88 100644 --- a/activemodel/lib/active_model/type/binary.rb +++ b/activemodel/lib/active_model/type/binary.rb @@ -40,7 +40,7 @@ module ActiveModel alias_method :to_str, :to_s def hex - @value.unpack("H*")[0] + @value.unpack1("H*") end def ==(other) |