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.
1 parent 0d6d65c commit 756129bCopy full SHA for 756129b
README.adoc
@@ -3190,6 +3190,19 @@ def some_method(bar: false)
3190
end
3191
----
3192
3193
+=== Merging Keyword Arguments [[merging-keyword-arguments]]
3194
+
3195
+When passing an existing hash as keyword arguments, add additional arguments directly rather than using `merge`.
3196
3197
+[source,ruby]
3198
+----
3199
+# bad
3200
+some_method(**opts.merge(foo: true))
3201
3202
+# good
3203
+some_method(**opts, foo: true)
3204
3205
3206
=== Arguments Forwarding [[arguments-forwarding]]
3207
3208
Use Ruby 2.7's arguments forwarding.
0 commit comments