I'm afraid I don't know quite enough Ruby to really give a proper answer, but I can use my 10k deleted-post Second Sight to give you the original contents of the post. The post was simply the code sample as follows below with no comentary:
def add_three_numbers num1 = nil, num2 = nil, num3 = nil
undefined = local_variables.select{|var| eval(var.to_s).nil?} - [:undefined]
puts "#{undefined.join(", ")} are undefined" unless undefined.empty?
end
add_three_numbers
# => num1, num2, num3 are undefined
add_three_numbers(1)
# => num2, num3 are undefined
I would post it as an answer, but, as I said, I don't know enough Ruby to provide meaningful commentary. I'd encourage you to self-answer and provide commentary as you understand it.
If you want to credit sawa's original post (visible only to >10k users), the exact answer link is https://stackoverflow.com/a/18476747/710446.