We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ca5871b + 044bcd5 commit 41afcfdCopy full SHA for 41afcfd
lib/grape/util/stackable_values.rb
@@ -13,9 +13,10 @@ def initialize(inherited_values = {})
13
14
def [](name)
15
return @froozen_values[name] if @froozen_values.key? name
16
- value = [@inherited_values[name], @new_values[name]]
17
- value.compact!
18
- value.flatten!(1)
+
+ value = []
+ value.concat(@inherited_values[name]) if @inherited_values[name]
19
+ value.concat(@new_values[name]) if @new_values[name]
20
value
21
end
22
0 commit comments