Use %i with a delimiter to create an array of symbols from whitespace-separated content: %i(a b c) produces [:a, :b, :c]. section 9.2.1
Contrast the related forms:
- %i creates symbols without interpolation. section 9.2.1
- %I enables double-quoted interpolation rules, as in %I("#{d}"). section 9.2.1
- %w and %W provide corresponding whitespace-separated string arrays. section 9.2.1
>> %i(a b c)
=> [:a, :b, :c]
>> d = "David"
=> "David"
>> %I("#{d}")
=> [:"\"David\""]
Compare ordinary symbol construction with interpolated %I syntax and inspect the resulting arrays. section 9.2.1
