https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112019-12-10T13:45:38ZRuby Issue Tracking SystemRuby master - Misc #16408: Ruby docs list incorrect method signatures for PTY::getpty/PTY::spawnhttps://redmine.ruby-lang.org/issues/16408?journal_id=830702019-12-10T13:45:38Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Thank you for the report and tests.<br>
As for the <code>option</code> tests, <code>PTY.spawn</code> can fail after <code>PTY.open</code>, so could you separate <code>ensure</code> or use the block form of <code>PTY.open</code>?<br>
And as it doesn't seem necessary to be <code>PTY</code>, doesn't <code>IO.pipe</code> suffice?</p> Ruby master - Misc #16408: Ruby docs list incorrect method signatures for PTY::getpty/PTY::spawnhttps://redmine.ruby-lang.org/issues/16408?journal_id=831052019-12-12T17:12:49Zyarmiganosca (Chris Hoffman)
<ul></ul><p>Turns out <code>IO.pipe</code> would result in <code>"bar\n"</code> instead of <code>"bar\r\n"</code> (<code>PTY.open</code> results in strings that end in <code>"\r\n"</code>). Given the rest of the file's test cases all expect strings that end in <code>"\r\n"</code>, I thought that sticking to convention would be less confusing for future readers.</p>