Can I do the following? If so how?
I have an array of symbols
symbols = %w{:sym1 :sym2 :sym3} # is this correct implementation?# I'm putting this in a function for this illustrationdef check_symbol(symbol) symbols.include?(symbol)endputs check_symbol(:sym1) # expect true, but I get falseputs check_symbol(:sym44) # expect false of course
How can I do so I get true on the first puts statement?