#! /usr/bin/env ruby

def bad(param_1:, param_2:, **unused)
  [param_1, param_2, unused]
end

data = {
  param_1: "whatever",
  param_2: "Not nil",
  "unused_param".to_sym => "Unused variable"
}

output = bad(data)

if output[1] != "Not nil"
  raise "Output 1 has unexpected value: #{output[1].inspect}"
else
  puts "Success"
end

if false
  # Comment out the below line to trigger the raise on line 16.
  # Leave it uncommented to trigger the "success" message
  :unused_param
end
