[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[#63391] Access Modifiers (Internal Interfaces) — Daniel da Silva Ferreira <danieldasilvaferreira@...>
Hi,
3 messages
2014/06/28
[ruby-core:63180] [ruby-trunk - Bug #9944] in ruby for windows in "system" a redirection to append a file works incorrectly
From:
phasis@...
Date:
2014-06-15 10:13:00 UTC
List:
ruby-core #63180
Issue #9944 has been updated by Heesob Park.
If this is a Windows specific issue, here is a patch:
~~~diff
diff --git a/process.c b/process.c
index e626542..05bb79c 100644
--- a/process.c
+++ b/process.c
@@ -2767,6 +2767,11 @@ run_exec_open(VALUE ary, struct rb_execarg *sargp, char *errmsg, size_t errmsg_b
ERRMSG("dup2");
return -1;
}
+#ifdef _WIN32
+ if (flags & O_APPEND) {
+ lseek(fd, 0L, SEEK_END);
+ }
+#endif
rb_update_max_fd(fd);
}
i++;
~~~
----------------------------------------
Bug #9944: in ruby for windows in "system" a redirection to append a file works incorrectly
https://bugs.ruby-lang.org/issues/9944#change-47233
* Author: Dmitry Bolshakov
* Status: Open
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.0.0p481 (2014-05-08) [i386-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
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/