syswrite changes from 1.8 to 1.9

T

Tom Gregus

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
 
D

Douglas Seifert

[Note: parts of this message were removed to make it a legal post.]

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...
 
T

Tom Gregus

Douglas said:
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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top