I found this code under this question, which checks if any argument is passed to a method:
def foo(bar = (bar_set = true; :baz))
if bar_set
# optional argument was supplied
end
end
What is the purpose of the ; :baz
in this default value, and in what case would I use it?