On Tue, Dec 16, 2003 at 07:25:15AM +0900, Michael Campbell wrote: > Ron Coutts wrote: > > > file = File.open("ordinal") > > while file.gets > > print if /third/ .. /fifth/ > > End > > > > Unfortunately this code snippet is buggy as it prints out all ten > lines > > of the file, not just lines three through five as mentioned in the > book. > > So I'm still stuck on this problem. > > This works for me; no bug that I can see. What version of Ruby are you running? I'm seeing the same behavior as Ron in 1.8.1p3, 2003-12-05 build. It prints every line in the file. -Mark