>>>>> "H" == Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> writes:

H> The Principle of Least Surprise would suggest this is not a feature.  Or
H> is it?   I can see what is happening, I'm not really sure that it should.

 perl do the same thing, you can write :

pigeon% cat b.rb
#!/usr/bin/ruby
pos = DATA.pos
print DATA.readlines
DATA.pos = pos
print DATA.readlines
 
__END__
If a thing is worth doing
It is worth doing twice.
brains hgs
pigeon% 

pigeon% b.rb
If a thing is worth doing
It is worth doing twice.
brains hgs
If a thing is worth doing
It is worth doing twice.
brains hgs
pigeon% 



Guy Decoux