mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Ruby: support anonymous (hash)splat parameters/arguments
This commit is contained in:
@@ -84,3 +84,13 @@ def anonymous_block_parameter(array, &)
|
||||
end
|
||||
|
||||
run_block { |x; y, z | puts x }
|
||||
|
||||
# Anonymous splat parameter
|
||||
def anonymous_splat_parameter(array, *)
|
||||
array.concat(*)
|
||||
end
|
||||
|
||||
# Anonymous hash splat parameter
|
||||
def anonymous_hash_splat_parameter(hash, **)
|
||||
hash.merge(**)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user