diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a06a310..e1e929fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ #### Fixes -* Your contribution here. +* [#338](https://github.com/ruby-grape/grape-entity/pull/338): Fix ruby 2.7 deprecation warning - [@begotten63](https://github.com/begotten63). ### 0.8.1 (2020-07-15) diff --git a/lib/grape_entity/entity.rb b/lib/grape_entity/entity.rb index 73f0ddcd..e2f0f700 100644 --- a/lib/grape_entity/entity.rb +++ b/lib/grape_entity/entity.rb @@ -537,7 +537,7 @@ def delegate_attribute(attribute) if is_defined_in_entity?(attribute) send(attribute) elsif @delegator_accepts_opts - delegator.delegate(attribute, self.class.delegation_opts) + delegator.delegate(attribute, **self.class.delegation_opts) else delegator.delegate(attribute) end