$stdout.puts "one"
File.open('tmp.txt','w') {|f|
$stdout.reopen(f) # <-- Ruby.Net fails here
$stdout.puts "two"
$stdout.puts "three"
$stdout.reopen($stderr)
$stdout.puts "four"
}
IO.readlines('tmp.txt').each {|l|
puts "> #{l}"
}
Expected output:
one
four
> two
> three
Actual output:
one
Unhandled Exception: System.NotSupportedException: Stream does not support
seeking.
at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(Assembly Assembly, String[]
args)
at Ruby.Compiler.AST.SOURCEFILE.ExecuteMain(PEFile Assembly, String[]
args)
at Ruby.Compiler.RubyEntry.Process(String[] args)
Original issue reported on code.google.com by djl.rif...@googlemail.com on 16 Jan 2008 at 2:22
Original issue reported on code.google.com by
djl.rif...@googlemail.com
on 16 Jan 2008 at 2:22