From: nagachika00@... Date: 2018-03-07T14:28:39+00:00 Subject: [ruby-core:85970] [Ruby trunk Bug#11638] [doc] misleading IO.write offset description Issue #11638 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.2: DONTNEED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONE ruby_2_4 r62692 merged revision(s) 60294. ---------------------------------------- Bug #11638: [doc] misleading IO.write offset description https://bugs.ruby-lang.org/issues/11638#change-70837 * Author: akostadinov (Aleksandar Kostadinov) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONE ---------------------------------------- "If offset is not given, the file is truncated. Otherwise, it is not truncated." The above is NOT true when 'a' mode is used. I'd suggest to clarify in documentation that offset is usually 0 if not specified but in 'a' mode it is at end of file or something along these lines. http://ruby-doc.org/core-2.2.0/IO.html#method-c-write -- https://bugs.ruby-lang.org/ Unsubscribe: