https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-05-01T00:59:33ZRuby Issue Tracking SystemRuby master - Feature #13527: Accept IO object as stdin data in Open3.capturehttps://bugs.ruby-lang.org/issues/13527?journal_id=646052017-05-01T00:59:33Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>akr (Akira Tanaka)</i></li></ul> Ruby master - Feature #13527: Accept IO object as stdin data in Open3.capturehttps://bugs.ruby-lang.org/issues/13527?journal_id=673982017-10-21T07:01:10Zakr (Akira Tanaka)akr@fsij.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r60236.</p>
<hr>
<p>lib/open3.rb: accept IO-like object for :stdin_data argument.</p>
<p>Open3.capture3, Open3.capture2, Open3.capture2e accepts<br>
IO-like object for :stdin_data argument.<br>
<a href="/issues/13527">[ruby-core:80936]</a> [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Accept IO object as stdin data in Open3.capture (Closed)" href="https://bugs.ruby-lang.org/issues/13527">#13527</a>] proposed by janko.</p> Ruby master - Feature #13527: Accept IO object as stdin data in Open3.capturehttps://bugs.ruby-lang.org/issues/13527?journal_id=698572018-01-26T11:23:27Zjanko (Janko Marohnić)janko@hey.com
<ul></ul><p>Thank you for the patch!</p>
<p>Since IO.copy_stream also accepts IO objects that respond only to #read (and not #readpartial), would it be possible to also permit those objects as :stdin_data (maybe check that the object responds to either #read or #readpartial)?</p>
<p>That was my use case, being able to pass any #read-able object as the standard input. In my case the IO-like objects I work with don't respond to #readpartial, because #read is enough.</p>