Skip to content

Commit fba6e1f

Browse files
committed
Don't modify original options.
1 parent fa9e3a6 commit fba6e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grape/dsl/inside_route.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module InsideRoute
1616
# options. `:include_parent_namespaces` defaults to true, hence must be set to false if
1717
# you want only to return params declared against the current/target endpoint.
1818
def declared(params, options = {}, declared_params = nil)
19-
options.reverse_merge!(include_missing: true, include_parent_namespaces: true)
19+
options = options.reverse_merge(include_missing: true, include_parent_namespaces: true)
2020

2121
declared_params ||= (!options[:include_parent_namespaces] ? route_setting(:declared_params) : (route_setting(:saved_declared_params) || [])).flatten(1) || []
2222

0 commit comments

Comments
 (0)