What is the meaning, and where is the Ruby documentation for the syntax of:
Array(phrases)
which I found browsing the Rails source here:
# File actionpack/lib/action_view/helpers/text_helper.rb, line 109
...
119: match = Array(phrases).map { |p| Regexp.escape(p) }.join('|')
I thought that Array.new would normally be used to create an array, so something different must be going on here. BTW from the context around this code, the phrases
variable can be either a string or an array of strings.