I need to use a Ruby symbol as the default value for an argument, but I also want to use keyword arguments, because they are so neat.
I found that wrapping the symbol in in parenthesis or using a constant to refer to the symbol works.
Is there a better way to do this with Ruby 2.6+ (and still have a symbol as the default value)?
def mymethod myarg:(:mydefaultsymbol)
DEFAULT_MYVALUE = :mydefaultsymbol
def mymethod myarg:DEFAULT_MYVALUE
# where, in either case, mymethod # outputs :mydefaultsymbol