Convert CDATA input to string before gsub'ing

Rails 3.2 API allowed arbitrary input for cdata_section;
this change re-introduces the old behaviour.
Merge pull request #12693 from carpodaster/convert-cdata-input-to-string

Convert CDATA input to string before gsub'ing
short arrays in inspect