Skip to content

Commit

Permalink
Add support for Ruby 2.7 and its kwargs (attr-encrypted#383)
Browse files Browse the repository at this point in the history
In Ruby 3.0, positional arguments and keyword arguments will be
separated. Ruby 2.7 will warn for behaviors that will change in Ruby
3.0.

Co-authored-by: Igor Drozdov <[email protected]>
  • Loading branch information
2 people authored and WillRogers727 committed Feb 27, 2023
1 parent 82f6d70 commit 76ddd71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/attr_encrypted/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def attr_encrypted(*attrs)
end

define_method("#{attr}_changed?") do |options = {}|
attribute_changed?(attr, options)
attribute_changed?(attr, **options)
end

define_method("#{attr}_change") do
Expand Down

0 comments on commit 76ddd71

Please sign in to comment.