2

We just got stung by an apparent 'feature' in ruby where if you put 2 strings side by side they are automatically concatenated together, i.e.:

irb(main):001:0> ['h1', 'h2' 'h3']
=> ["h1", "h2h3"]

Why would this not throw an error? It seems surprising.

rainkinz
  • 10,082
  • 5
  • 45
  • 73

0 Answers0