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 1f713a9 + 5b00be4 commit 36f37feCopy full SHA for 36f37fe
lib/syntax_tree/parser.rb
@@ -2079,12 +2079,16 @@ def on_params(
2079
keyword_rest,
2080
block
2081
)
2082
+ # This is to make it so that required keyword arguments
2083
+ # have a `nil` for the value instead of a `false`.
2084
+ keywords&.map! { |(key, value)| [key, value || nil] }
2085
+
2086
parts = [
2087
*requireds,
2088
*optionals&.flatten(1),
2089
rest,
2090
*posts,
- *keywords&.flat_map { |(key, value)| [key, value || nil] },
2091
+ *keywords&.flatten(1),
2092
(keyword_rest if keyword_rest != :nil),
2093
(block if block != :&)
2094
].compact
0 commit comments