From: Hugh Sasse Staff Elec Eng Date: 2000-08-08T15:13:04+01:00 Subject: [ruby-talk:04346] DATA and rewind. The DATA file refers to information after __END__ in a ruby program. Fair enough. So I would expect to be able to rewind it, if I wish to scan the information several times. I did not expect this: brains hgs 124 %> chmod u+x !$ chmod u+x DATA.rb brains hgs 125 %> ./!$ ./DATA.rb If a thing is worth doing It is worth doing twice. #!/usr/local/bin/ruby -w # Test to see how DATA copes with rewind. # Created 08-AUG-2000 # Author Hugh G. Sasse print DATA.readlines DATA.rewind print DATA.readlines __END__ If a thing is worth doing It is worth doing twice. brains hgs 126 %> This is with brains hgs 126 %> ruby --version ruby 1.4.4 (2000-04-14) [sparc-solaris2.5.1] brains hgs 127 %> The Principle of Least Surprise would suggest this is not a feature. Or is it? I can see what is happening, I'm not really sure that it should. Hugh hgs@dmu.ac.uk