From: "jeremyevans0 (Jeremy Evans) via ruby-core" Date: 2023-05-30T22:43:42+00:00 Subject: [ruby-core:113710] [Ruby master Bug#9944] in ruby for windows in "system" a redirection to append a file works incorrectly Issue #9944 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Assigned to Rejected @headius and I discussed this on the train back from RubyKaigi and determined this is a Windows-specific limitation, not a Ruby bug, and nothing Ruby does can fix the issue in all cases. ---------------------------------------- Bug #9944: in ruby for windows in "system" a redirection to append a file works incorrectly https://bugs.ruby-lang.org/issues/9944#change-103361 * Author: bdimych (Dmitry Bolshakov) * Status: Rejected * Priority: Normal * Assignee: windows * ruby -v: ruby 2.0.0p481 (2014-05-08) [i386-mingw32] * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED ---------------------------------------- ~~~ c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych>C:\Ruby200\bin\ruby.exe -v ruby 2.0.0p481 (2014-05-08) [i386-mingw32] c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych>( echo first line & echo second line & echo third line ) > test.txt c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych>type test.txt first line second line third line c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych>C:\Ruby200\bin\ruby.exe -e "system 'cmd', '/c', 'echo', 'blabla', :out => ['test.txt', 'a']" c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych>type test.txt blabla ne second line third line c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> c:\Users\bdimych> ~~~ --- ruby writes "blabla" in the beginning instead of appending windows 7 64 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/