<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/open3.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/open3] Update to match JRuby 9.4</title>
<updated>2021-12-09T10:28:54+00:00</updated>
<author>
<name>Charles Oliver Nutter</name>
<email>headius@headius.com</email>
</author>
<published>2021-09-30T15:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=eb06b37c460a8237fd0f02a075307e1229b0359b'/>
<id>eb06b37c460a8237fd0f02a075307e1229b0359b</id>
<content type='text'>
This allows the wrapper functions in the main open3 to be defined
while using our ProcessBuilder logic for the internal popen
implementation.

Note this adds logic to reject redirects from a numeric fd to a
live IO object (or not a String or to_path object) since we cannot
support direct IO redirects with ProcesBuilder.

This patch allows tests to complete with the ProcessBuilder impl.
Only three tests fail:

* test_numeric_file_descriptor2 and test_numeric_file_descriptor2
  fail due to redirecting streams to a pipe IO.
* test_pid fails expecting a real PID which we cannot provide via
  ProcessBuilder.

https://github.com/ruby/open3/commit/73f986c233
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows the wrapper functions in the main open3 to be defined
while using our ProcessBuilder logic for the internal popen
implementation.

Note this adds logic to reject redirects from a numeric fd to a
live IO object (or not a String or to_path object) since we cannot
support direct IO redirects with ProcesBuilder.

This patch allows tests to complete with the ProcessBuilder impl.
Only three tests fail:

* test_numeric_file_descriptor2 and test_numeric_file_descriptor2
  fail due to redirecting streams to a pipe IO.
* test_pid fails expecting a real PID which we cannot provide via
  ProcessBuilder.

https://github.com/ruby/open3/commit/73f986c233
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/open3] Add JRuby's Windows (JDK non-native) Open3 support</title>
<updated>2021-12-09T10:28:54+00:00</updated>
<author>
<name>Charles Oliver Nutter</name>
<email>headius@headius.com</email>
</author>
<published>2021-09-29T18:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=01febcab3e6258051e2fc083b906d9ac2bdc3927'/>
<id>01febcab3e6258051e2fc083b906d9ac2bdc3927</id>
<content type='text'>
This adds JRuby's logic used on platforms where we do not have
native access to posix_spawn and related posix functions needed
to do fully-native subprocess launching and management. The code
here instead uses the JDK ProcessBuilder logic to simulate most
of the Open3 functionality.

This code does not pass all tests, currently, but provides most of
the key functionality on pure-Java (i.e. no native FFI) platforms.

https://github.com/ruby/open3/commit/689da19c42
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds JRuby's logic used on platforms where we do not have
native access to posix_spawn and related posix functions needed
to do fully-native subprocess launching and management. The code
here instead uses the JDK ProcessBuilder logic to simulate most
of the Open3 functionality.

This code does not pass all tests, currently, but provides most of
the key functionality on pure-Java (i.e. no native FFI) platforms.

https://github.com/ruby/open3/commit/689da19c42
</pre>
</div>
</content>
</entry>
<entry>
<title>Update library versions of the default gems.</title>
<updated>2020-12-22T12:45:28+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-22T12:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3'/>
<id>9b9cbbbc17bb5840581c7da37fd0feb0a7d4c1f3</id>
<content type='text'>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  They are followed up with
  https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract version number from the source</title>
<updated>2020-07-30T10:03:18+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-07-28T15:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2d96abb42abbe2e01f010ffc9ac51f0f9a50002'/>
<id>b2d96abb42abbe2e01f010ffc9ac51f0f9a50002</id>
<content type='text'>
"requiring version.rb" strategy has some issues.

- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time

etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"requiring version.rb" strategy has some issues.

- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time

etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>[open3] only close streams if a block is passed</title>
<updated>2020-06-18T17:00:20+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-06-18T14:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=adbdf11f94afd52d276c7891515e0eb808f6003f'/>
<id>adbdf11f94afd52d276c7891515e0eb808f6003f</id>
<content type='text'>
Ref: 5429deb075beb9a2b67adae269bbac16325876d1

The previous change totally borke `popen2e` in this usage:

```ruby
require 'open3'
stdin, stdout, process = Open3.popen2e("cat")
puts stdout.read
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ref: 5429deb075beb9a2b67adae269bbac16325876d1

The previous change totally borke `popen2e` in this usage:

```ruby
require 'open3'
stdin, stdout, process = Open3.popen2e("cat")
puts stdout.read
```
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/open3.rb: make sure that pipes are closed</title>
<updated>2020-05-26T15:20:14+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-05-26T15:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5429deb075beb9a2b67adae269bbac16325876d1'/>
<id>5429deb075beb9a2b67adae269bbac16325876d1</id>
<content type='text'>
Attempting to invoke a non-existent command led to the leak of fds.

http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20200526T140004Z.log.html.gz
```
[ 9101/20195] TestGemExtCmakeBuilder#test_self_build = 0.01 sLeaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 7 : #&lt;IO:fd 7&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 10 : #&lt;IO:fd 10&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 11 : #&lt;IO:fd 11&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 12 : #&lt;IO:fd 12&gt;
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attempting to invoke a non-existent command led to the leak of fds.

http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20200526T140004Z.log.html.gz
```
[ 9101/20195] TestGemExtCmakeBuilder#test_self_build = 0.01 sLeaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 7 : #&lt;IO:fd 7&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 10 : #&lt;IO:fd 10&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 11 : #&lt;IO:fd 11&gt;
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 12 : #&lt;IO:fd 12&gt;
```
</pre>
</div>
</content>
</entry>
<entry>
<title>open3.rb don't use keyword splat (**).</title>
<updated>2018-12-12T06:48:46+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-12-12T06:48:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c8cb0565a132f2f50f1ebd481c6b8dcec68c8c71'/>
<id>c8cb0565a132f2f50f1ebd481c6b8dcec68c8c71</id>
<content type='text'>
revert r43582, r49173 and r49177.

open3 arguments uses spawn-like keyword arguments.
Both symbol and integer keys are used.
```
Open3.capture2(*command, :in =&gt; IO::NULL, 3 =&gt; IO::NULL)
``

This style cannot be supported with keyword splat (**) since Ruby 2.6.
Because Ruby 2.6 prohibits symbol/non-symbol key hash separation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
revert r43582, r49173 and r49177.

open3 arguments uses spawn-like keyword arguments.
Both symbol and integer keys are used.
```
Open3.capture2(*command, :in =&gt; IO::NULL, 3 =&gt; IO::NULL)
``

This style cannot be supported with keyword splat (**) since Ruby 2.6.
Because Ruby 2.6 prohibits symbol/non-symbol key hash separation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Use `&amp;.` instead of modifier if</title>
<updated>2018-04-30T10:01:08+00:00</updated>
<author>
<name>kazu</name>
<email>kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-04-30T10:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cb67e0bd9c4382b916e7b2401bfbe7b01786da1c'/>
<id>cb67e0bd9c4382b916e7b2401bfbe7b01786da1c</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/open3.rb: accept IO-like object for :stdin_data argument.</title>
<updated>2017-10-21T07:00:58+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-10-21T07:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3d9453994c965abff8851d008a01b40153ffee77'/>
<id>3d9453994c965abff8851d008a01b40153ffee77</id>
<content type='text'>
Open3.capture3, Open3.capture2, Open3.capture2e accepts
IO-like object for :stdin_data argument.
[ruby-core:80936] [Feature #13527] proposed by janko.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Open3.capture3, Open3.capture2, Open3.capture2e accepts
IO-like object for :stdin_data argument.
[ruby-core:80936] [Feature #13527] proposed by janko.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/open3: favor symbol proc when possible</title>
<updated>2016-11-21T23:13:16+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-11-21T23:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e3c288569833b6777e7ecc0bbc26f8e6ca8f2ba7'/>
<id>e3c288569833b6777e7ecc0bbc26f8e6ca8f2ba7</id>
<content type='text'>
It reduces both human and machine code; as well as reducing
the confusion from variable naming.

* lib/open3.rb (popen_run, pipeline, pipeline_run): avoid capture

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It reduces both human and machine code; as well as reducing
the confusion from variable naming.

* lib/open3.rb (popen_run, pipeline, pipeline_run): avoid capture

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
