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 <idrozdov@gitlab.com>
  • Loading branch information
2 people authored and pdoulatshahi committed Apr 4, 2023
1 parent 262f206 commit 6b27203
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 6b27203

Please sign in to comment.