From: Kent Dahl Date: 2002-05-22T23:20:12+09:00 Subject: Re: -e oneliners with File.open Tobias Reif wrote: > ruby -e 'File.open("foo.txt","w") do |f|; f.write 6; end' > > (the string to write was different, but the above is enough to reproduce > the error) > but got > > -e:1: parse error [kentda@v052a tmp]$ ruby -e 'File.open("foo.txt","w") do |f|; f.write 6; end' [kentda@v052a tmp]$ less foo.txt 6 [kentda@v052a tmp]$ ruby --version ruby 1.6.6 (2001-12-26) [i586-linux-gnu] [kentda@v052a tmp]$ ruby -e 'File.open("delete.txt", "w") do |file| # 100 000 lines with 1 000 xs =~ 100 MB file.write((("x"*1000)+"\n")*100000) end' Hmm, no problem here... What version are you using? -- (\[ Kent Dahl ]/)_ _~_ __[ http://www.stud.ntnu.no/~kentda/ ]___/~ ))\_student_/(( \__d L b__/ NTNU - graduate engineering - 4. year ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)