Michael Morin wrote:
> 
> Oh yeah, that is a typo left over from the other example.  That line
> should read just "yield lines".

That's what I figured.  Thanks a bunch.  My method ended up like this:
----------------------------------------------------------
class File

  def self.change(filename)

    # read the file, execute a block, then write the file
      File.open(filename, 'r+') do |file|
        lines = file.readlines
        catch :nochanges
          yield lines
          file.pos = 0
          file.print lines
          file.truncate(file.pos)
        end
      end
  end
end
----------------------------------------------------------
-- 
Posted via http://www.ruby-forum.com/.