# Syswrite changes from 1.8 to 1.9

**URL:** <https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023>\
**Category:** Ruby\
**Created:** [July 22, 2010, 2:39pm UTC](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023 "2010-07-22T14:39:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![virgin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f17d59/32.png) [@virgin](https://www.ruby-forum.com/u/virgin)\
**Post date:** [July 22, 2010, 2:39pm UTC](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023/1 "2010-07-22T14:39:06Z")

</div>

Hi guys,

I have a ruby script which is scraping a website with Hpricot. I am  
creating an xml and an sql file from data scraped. it was working well  
under 1.8, but I have upgraded to 1.9 (because of character encoding),  
but now the script writes ‘["’ in front of every string, and the ‘\n’  
gets written as a ‘\n’ and not as a new line.  
I am using double quotes when assigning the string to a variable.  
What should I change?

regards  
Tom

---

<div class="post-metadata">

**Author:** ![virgin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f17d59/32.png) [@virgin](https://www.ruby-forum.com/u/virgin)\
**Post date:** [July 22, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023/2 "2010-07-22T14:45:12Z")

</div>

Sounds to me that what you thought were strings were really arrays? In  
1.9,  
the to\_s method of arrays has changed to make it look like the results  
of  
#inspect.

Good luck…

---

<div class="post-metadata">

**Author:** ![virgin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f17d59/32.png) [@virgin](https://www.ruby-forum.com/u/virgin)\
**Post date:** [July 22, 2010, 3:16pm UTC](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023/3 "2010-07-22T15:16:33Z")

</div>

Douglas S. wrote:

> Sounds to me that what you thought were strings were really arrays? In  
> 1.9,  
> the to\_s method of arrays has changed to make it look like the results  
> of  
> #inspect.
> 
> Good luck…

Thanks for the fast response.  
It seems that you are right, and it was a user error (as usual). I was  
using a comma to concatenate more strings and vairables into one big  
string, and 1.8 was happy with this. changed the comma to plus sign and  
it works now. 🙂
