Skip to content

Commit 9b678f4

Browse files
committed
Fix Ruby 2.7 deprecation warning
This fixes the warning: ``` ruby/2.7.0/gems/grape-1.4.0/lib/grape/dsl/inside_route.rb: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call ``` More details: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
1 parent 7e43215 commit 9b678f4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#### Fixes
88

99
* Your contribution here.
10+
* [#2104](https://github.com/ruby-grape/grape/pull/2104): Fix Ruby 2.7 keyword deprecation warning - [@stanhu](https://github.com/stanhu).
1011
* [#2103](https://github.com/ruby-grape/grape/pull/2103): Ensure complete declared params structure is present - [@tlconnor](https://github.com/tlconnor).
1112
* [#2099](https://github.com/ruby-grape/grape/pull/2099): Added truffleruby to Travis-CI - [@gogainda](https://github.com/gogainda).
1213
* [#2089](https://github.com/ruby-grape/grape/pull/2089): Specify order of mounting Grape with Rack::Cascade in README - [@jonmchan](https://github.com/jonmchan).

lib/grape/dsl/inside_route.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def entity_class_for_obj(object, options)
422422
def entity_representation_for(entity_class, object, options)
423423
embeds = { env: env }
424424
embeds[:version] = env[Grape::Env::API_VERSION] if env[Grape::Env::API_VERSION]
425-
entity_class.represent(object, embeds.merge(options))
425+
entity_class.represent(object, **embeds.merge(options))
426426
end
427427
end
428428
end

0 commit comments

Comments
 (0)