File Packing Ideas - FINAL

Merci!

···

-----Original Message-----
From: ts [mailto:decoux@moulon.inra.fr]
Sent: Thursday, November 14, 2002 9:00 AM
To: ruby-talk@ruby-lang.org
Cc: ruby-talk@ruby-lang.org
Subject: Re: File Packing Ideas - FINAL

I did not see anything on reading an entire file straight into a string.
I
did find that readlines makes each line an array element. I am very
curious how you read a whole file into a string…?

pigeon% cat b.rb
#!/usr/bin/ruby
p IO.readlines(‘b.rb’, nil)[0]
pigeon%

pigeon% b.rb
“#!/usr/bin/ruby\np IO.readlines(‘b.rb’, nil)[0]\n”
pigeon%

Guy Decoux