From: usa@... Date: 2018-03-18T15:21:44+00:00 Subject: [ruby-core:86186] [Ruby trunk Bug#11638] [doc] misleading IO.write offset description Issue #11638 has been updated by usa (Usaku NAKAMURA). Backport changed from 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONE to 2.2: DONTNEED, 2.3: DONE, 2.4: DONE ruby_2_3 r62823 merged revision(s) 60294. ---------------------------------------- Bug #11638: [doc] misleading IO.write offset description https://bugs.ruby-lang.org/issues/11638#change-71073 * Author: akostadinov (Aleksandar Kostadinov) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: DONTNEED, 2.3: DONE, 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: