I'm trying to get a array from a string passed as parameters to match a dictionary after.
My code:
def substrings(*args, dictionary)
words = args.to_s.split(" ")
puts words[0]
puts words[1]
puts words[2]
end
substrings("below as above", dictionary)
The result is
["below
as
above"]
Why the first and last elements has this [" and "]??
Hope I was clear.