Problem with string "merging" / escaping


#1

I’m on Mac OS 10.4.3, Ruby 1.8.2, Rails 1.0, MySQL 5,
SaltedHashLoginGenerator and I’m seeing a strange problem where
sometimes generated HTML isn’t quite correct, in the following way:

My code:

<%= datetime_select :event, :meet_at, :start_year => 2006 %>

Generated code:

["2006\n", "2007\n", "2008\n", "2009\n", "2010\n", "2011\n"]

As you can see, it looks like the array of strings never got put back
together into a string. Strangest of all, it only seems to happen
sometimes. I just saw it happen with a flash, too, where my code prints
@flash[‘notice’] and what got generated was:

There were problems with the following fields:

    ["
  • Phone number has already been taken
  • ", "
  • Password is too short (min is 5 characters)
  • "]

If you look closely, you’ll see that it again looks like an Array rather
than a string.

Any ideas?

-elan