From: Ian Macdonald Date: 2002-06-19T07:31:53+09:00 Subject: in-place editing I'm trying to figure out why the following code chunk fails to edit my file in-place: $-i = '.foo' # set in-place edit mode mf = File.open('Makefile', 'r+') mf.each_line do |line| line.sub!(/-l\$\(RUBY_INSTALL_NAME\) /, "") end mf.close Any ideas? Ian -- Ian Macdonald | Life is like an onion: you peel off layer ian@caliban.org | after layer and then you find there is | nothing in it. -- James Huneker | |