rbs 4.0.0.dev.5 → 4.0.1.dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +1 -0
- data/.github/workflows/c-check.yml +8 -4
- data/.github/workflows/comments.yml +3 -1
- data/.github/workflows/dependabot.yml +1 -1
- data/.github/workflows/ruby.yml +10 -0
- data/.github/workflows/rust.yml +95 -0
- data/CHANGELOG.md +323 -0
- data/Rakefile +12 -29
- data/Steepfile +1 -0
- data/config.yml +393 -37
- data/core/array.rbs +218 -188
- data/core/basic_object.rbs +9 -8
- data/core/class.rbs +6 -5
- data/core/comparable.rbs +45 -31
- data/core/complex.rbs +52 -40
- data/core/dir.rbs +57 -45
- data/core/encoding.rbs +5 -5
- data/core/enumerable.rbs +96 -91
- data/core/enumerator.rbs +4 -3
- data/core/errno.rbs +3 -2
- data/core/errors.rbs +31 -29
- data/core/exception.rbs +12 -12
- data/core/fiber.rbs +36 -36
- data/core/file.rbs +186 -113
- data/core/file_test.rbs +2 -2
- data/core/float.rbs +41 -32
- data/core/gc.rbs +78 -70
- data/core/hash.rbs +70 -60
- data/core/integer.rbs +32 -28
- data/core/io/buffer.rbs +36 -36
- data/core/io/wait.rbs +7 -7
- data/core/io.rbs +120 -135
- data/core/kernel.rbs +189 -139
- data/core/marshal.rbs +3 -3
- data/core/match_data.rbs +14 -12
- data/core/math.rbs +69 -67
- data/core/method.rbs +6 -6
- data/core/module.rbs +146 -85
- data/core/nil_class.rbs +4 -3
- data/core/numeric.rbs +35 -32
- data/core/object.rbs +6 -8
- data/core/object_space.rbs +11 -10
- data/core/pathname.rbs +131 -81
- data/core/proc.rbs +65 -33
- data/core/process.rbs +219 -201
- data/core/ractor.rbs +15 -11
- data/core/random.rbs +4 -3
- data/core/range.rbs +52 -47
- data/core/rational.rbs +5 -5
- data/core/rbs/unnamed/argf.rbs +58 -51
- data/core/rbs/unnamed/env_class.rbs +18 -13
- data/core/rbs/unnamed/main_class.rbs +123 -0
- data/core/rbs/unnamed/random.rbs +7 -5
- data/core/regexp.rbs +236 -197
- data/core/ruby.rbs +1 -1
- data/core/ruby_vm.rbs +32 -30
- data/core/rubygems/config_file.rbs +5 -5
- data/core/rubygems/errors.rbs +1 -1
- data/core/rubygems/requirement.rbs +5 -5
- data/core/rubygems/rubygems.rbs +5 -3
- data/core/set.rbs +17 -16
- data/core/signal.rbs +2 -2
- data/core/string.rbs +311 -292
- data/core/struct.rbs +26 -25
- data/core/symbol.rbs +25 -24
- data/core/thread.rbs +40 -34
- data/core/time.rbs +47 -42
- data/core/trace_point.rbs +34 -31
- data/core/true_class.rbs +2 -2
- data/core/unbound_method.rbs +10 -10
- data/core/warning.rbs +7 -7
- data/docs/collection.md +1 -1
- data/docs/config.md +171 -0
- data/docs/inline.md +110 -4
- data/docs/syntax.md +13 -12
- data/ext/rbs_extension/ast_translation.c +489 -135
- data/ext/rbs_extension/class_constants.c +8 -0
- data/ext/rbs_extension/class_constants.h +4 -0
- data/ext/rbs_extension/legacy_location.c +28 -51
- data/ext/rbs_extension/legacy_location.h +37 -0
- data/ext/rbs_extension/main.c +12 -20
- data/include/rbs/ast.h +423 -195
- data/include/rbs/lexer.h +2 -2
- data/include/rbs/location.h +25 -44
- data/include/rbs/parser.h +2 -2
- data/include/rbs/util/rbs_constant_pool.h +0 -3
- data/include/rbs.h +8 -0
- data/lib/rbs/ast/ruby/annotations.rb +157 -4
- data/lib/rbs/ast/ruby/members.rb +374 -22
- data/lib/rbs/cli/validate.rb +5 -60
- data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
- data/lib/rbs/definition_builder.rb +60 -27
- data/lib/rbs/errors.rb +0 -11
- data/lib/rbs/inline_parser.rb +1 -1
- data/lib/rbs/parser_aux.rb +20 -7
- data/lib/rbs/prototype/helpers.rb +57 -0
- data/lib/rbs/prototype/rb.rb +1 -26
- data/lib/rbs/prototype/rbi.rb +1 -20
- data/lib/rbs/test/type_check.rb +3 -0
- data/lib/rbs/types.rb +62 -52
- data/lib/rbs/unit_test/type_assertions.rb +35 -8
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +0 -1
- data/rbs.gemspec +1 -1
- data/rust/.gitignore +1 -0
- data/rust/Cargo.lock +378 -0
- data/rust/Cargo.toml +7 -0
- data/rust/ruby-rbs/Cargo.toml +22 -0
- data/rust/ruby-rbs/build.rs +764 -0
- data/rust/ruby-rbs/examples/locations.rs +60 -0
- data/rust/ruby-rbs/src/lib.rs +1 -0
- data/rust/ruby-rbs/src/node/mod.rs +742 -0
- data/rust/ruby-rbs/tests/sanity.rs +47 -0
- data/rust/ruby-rbs/vendor/rbs/config.yml +1 -0
- data/rust/ruby-rbs-sys/Cargo.toml +23 -0
- data/rust/ruby-rbs-sys/build.rs +204 -0
- data/rust/ruby-rbs-sys/src/lib.rs +50 -0
- data/rust/ruby-rbs-sys/vendor/rbs/include +1 -0
- data/rust/ruby-rbs-sys/vendor/rbs/src +1 -0
- data/rust/ruby-rbs-sys/wrapper.h +1 -0
- data/sig/ast/ruby/annotations.rbs +191 -4
- data/sig/ast/ruby/members.rbs +21 -1
- data/sig/cli/validate.rbs +1 -6
- data/sig/definition_builder.rbs +2 -0
- data/sig/errors.rbs +0 -8
- data/sig/method_types.rbs +1 -1
- data/sig/parser.rbs +17 -13
- data/sig/prototype/helpers.rbs +2 -0
- data/sig/types.rbs +10 -11
- data/sig/unit_test/spy.rbs +0 -8
- data/sig/unit_test/type_assertions.rbs +11 -0
- data/src/ast.c +339 -161
- data/src/lexstate.c +1 -1
- data/src/location.c +7 -47
- data/src/parser.c +674 -480
- data/src/util/rbs_constant_pool.c +0 -4
- data/stdlib/bigdecimal/0/big_decimal.rbs +16 -16
- data/stdlib/cgi-escape/0/escape.rbs +4 -4
- data/stdlib/coverage/0/coverage.rbs +4 -3
- data/stdlib/date/0/date.rbs +33 -28
- data/stdlib/date/0/date_time.rbs +24 -23
- data/stdlib/did_you_mean/0/did_you_mean.rbs +17 -16
- data/stdlib/erb/0/erb.rbs +64 -53
- data/stdlib/etc/0/etc.rbs +55 -50
- data/stdlib/fileutils/0/fileutils.rbs +138 -125
- data/stdlib/forwardable/0/forwardable.rbs +10 -10
- data/stdlib/io-console/0/io-console.rbs +2 -2
- data/stdlib/json/0/json.rbs +135 -108
- data/stdlib/monitor/0/monitor.rbs +3 -3
- data/stdlib/net-http/0/net-http.rbs +159 -134
- data/stdlib/objspace/0/objspace.rbs +8 -7
- data/stdlib/open-uri/0/open-uri.rbs +8 -8
- data/stdlib/open3/0/open3.rbs +36 -35
- data/stdlib/openssl/0/openssl.rbs +144 -129
- data/stdlib/optparse/0/optparse.rbs +18 -14
- data/stdlib/pathname/0/pathname.rbs +2 -2
- data/stdlib/pp/0/pp.rbs +9 -8
- data/stdlib/prettyprint/0/prettyprint.rbs +7 -7
- data/stdlib/pstore/0/pstore.rbs +35 -30
- data/stdlib/psych/0/psych.rbs +61 -8
- data/stdlib/psych/0/store.rbs +2 -4
- data/stdlib/pty/0/pty.rbs +9 -6
- data/stdlib/random-formatter/0/random-formatter.rbs +2 -2
- data/stdlib/ripper/0/ripper.rbs +20 -17
- data/stdlib/securerandom/0/securerandom.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +2 -2
- data/stdlib/socket/0/addrinfo.rbs +7 -7
- data/stdlib/socket/0/basic_socket.rbs +3 -3
- data/stdlib/socket/0/ip_socket.rbs +10 -8
- data/stdlib/socket/0/socket.rbs +10 -9
- data/stdlib/socket/0/tcp_server.rbs +1 -1
- data/stdlib/socket/0/tcp_socket.rbs +1 -1
- data/stdlib/socket/0/udp_socket.rbs +1 -1
- data/stdlib/socket/0/unix_server.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +55 -54
- data/stdlib/strscan/0/string_scanner.rbs +46 -44
- data/stdlib/tempfile/0/tempfile.rbs +24 -20
- data/stdlib/time/0/time.rbs +7 -5
- data/stdlib/tsort/0/tsort.rbs +7 -6
- data/stdlib/uri/0/common.rbs +26 -18
- data/stdlib/uri/0/file.rbs +2 -2
- data/stdlib/uri/0/generic.rbs +2 -2
- data/stdlib/uri/0/http.rbs +2 -2
- data/stdlib/uri/0/ldap.rbs +2 -2
- data/stdlib/uri/0/mailto.rbs +3 -3
- data/stdlib/uri/0/rfc2396_parser.rbs +6 -5
- data/stdlib/zlib/0/deflate.rbs +4 -3
- data/stdlib/zlib/0/gzip_reader.rbs +4 -4
- data/stdlib/zlib/0/gzip_writer.rbs +14 -12
- data/stdlib/zlib/0/inflate.rbs +1 -1
- data/stdlib/zlib/0/need_dict.rbs +1 -1
- metadata +23 -5
- data/.github/workflows/valgrind.yml +0 -42
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# The objspace library extends the ObjectSpace module and adds several methods
|
|
3
3
|
# to get internal statistic information about object/memory management.
|
|
4
4
|
#
|
|
5
|
-
# You need to
|
|
5
|
+
# You need to <code>require 'objspace'</code> to use this extension module.
|
|
6
6
|
#
|
|
7
7
|
# Generally, you **SHOULD** **NOT** use this library if you do not know about
|
|
8
8
|
# the MRI implementation. Mainly, this library is for (memory) profiler
|
|
@@ -214,12 +214,13 @@ module ObjectSpace
|
|
|
214
214
|
# -->
|
|
215
215
|
# Dump the contents of a ruby object as JSON.
|
|
216
216
|
#
|
|
217
|
-
# *output* can be one of:
|
|
217
|
+
# *output* can be one of: <code>:stdout</code>, <code>:file</code>,
|
|
218
|
+
# <code>:string</code>, or IO object.
|
|
218
219
|
#
|
|
219
|
-
# *
|
|
220
|
-
# object;
|
|
221
|
-
# *
|
|
222
|
-
# *
|
|
220
|
+
# * <code>:file</code> means dumping to a tempfile and returning corresponding
|
|
221
|
+
# File object;
|
|
222
|
+
# * <code>:stdout</code> means printing the dump and returning `nil`;
|
|
223
|
+
# * <code>:string</code> means returning a string with the dump;
|
|
223
224
|
# * if an instance of IO object is provided, the output goes there, and the
|
|
224
225
|
# object is returned.
|
|
225
226
|
#
|
|
@@ -254,7 +255,7 @@ module ObjectSpace
|
|
|
254
255
|
#
|
|
255
256
|
# If *shapes* is a positive integer, only shapes newer than the provided shape
|
|
256
257
|
# id are dumped. The current shape_id can be accessed using
|
|
257
|
-
#
|
|
258
|
+
# <code>RubyVM.stat(:next_shape_id)</code>.
|
|
258
259
|
#
|
|
259
260
|
# If *shapes* is `false`, no shapes are dumped.
|
|
260
261
|
#
|
|
@@ -9,9 +9,9 @@ module URI
|
|
|
9
9
|
# If the first argument responds to the 'open' method, 'open' is called on it
|
|
10
10
|
# with the rest of the arguments.
|
|
11
11
|
#
|
|
12
|
-
# If the first argument is a string that begins with
|
|
13
|
-
# parsed by URI.parse. If the parsed object responds to the 'open'
|
|
14
|
-
# 'open' is called on it with the rest of the arguments.
|
|
12
|
+
# If the first argument is a string that begins with <code>(protocol)://</code>,
|
|
13
|
+
# it is parsed by URI.parse. If the parsed object responds to the 'open'
|
|
14
|
+
# method, 'open' is called on it with the rest of the arguments.
|
|
15
15
|
#
|
|
16
16
|
# Otherwise, Kernel#open is called.
|
|
17
17
|
#
|
|
@@ -349,17 +349,17 @@ module OpenURI
|
|
|
349
349
|
# : Synopsis:
|
|
350
350
|
# :ftp_active_mode=>bool
|
|
351
351
|
#
|
|
352
|
-
#
|
|
353
|
-
# passive mode by default. Note that the active mode is
|
|
354
|
-
# or prior.
|
|
352
|
+
# <code>:ftp_active_mode => true</code> is used to make ftp active mode.
|
|
353
|
+
# Ruby 1.9 uses passive mode by default. Note that the active mode is
|
|
354
|
+
# default in Ruby 1.8 or prior.
|
|
355
355
|
#
|
|
356
356
|
#
|
|
357
357
|
# :redirect
|
|
358
358
|
# : Synopsis:
|
|
359
359
|
# :redirect=>bool
|
|
360
360
|
#
|
|
361
|
-
#
|
|
362
|
-
# all HTTP redirects.
|
|
361
|
+
# <code>:redirect</code> is true by default. <code>:redirect =>
|
|
362
|
+
# false</code> is used to disable all HTTP redirects.
|
|
363
363
|
#
|
|
364
364
|
# OpenURI::HTTPRedirect exception raised on redirection. Using `true` also
|
|
365
365
|
# means that redirections between http and ftp are permitted.
|
data/stdlib/open3/0/open3.rbs
CHANGED
|
@@ -60,10 +60,10 @@ module Open3
|
|
|
60
60
|
# * Creates a child process, by calling Open3.popen3 with the given arguments
|
|
61
61
|
# (except for certain entries in hash `options`; see below).
|
|
62
62
|
# * Returns as string `stdout_s` the standard output of the child process.
|
|
63
|
-
# * Returns as `status` a
|
|
64
|
-
# status of the child process.
|
|
63
|
+
# * Returns as `status` a <code>Process::Status</code> object that represents
|
|
64
|
+
# the exit status of the child process.
|
|
65
65
|
#
|
|
66
|
-
# Returns the array
|
|
66
|
+
# Returns the array <code>[stdout_s, status]</code>:
|
|
67
67
|
#
|
|
68
68
|
# stdout_s, status = Open3.capture2('echo "Foo"')
|
|
69
69
|
# # => ["Foo\n", #<Process::Status: pid 2326047 exit 0>]
|
|
@@ -86,15 +86,15 @@ module Open3
|
|
|
86
86
|
# The hash `options` is given; two options have local effect in method
|
|
87
87
|
# Open3.capture2:
|
|
88
88
|
#
|
|
89
|
-
# * If entry
|
|
90
|
-
# string value is sent to the command's standard input:
|
|
89
|
+
# * If entry <code>options[:stdin_data]</code> exists, the entry is removed
|
|
90
|
+
# and its string value is sent to the command's standard input:
|
|
91
91
|
#
|
|
92
92
|
# Open3.capture2('tee', stdin_data: 'Foo')
|
|
93
93
|
#
|
|
94
94
|
# # => ["Foo", #<Process::Status: pid 2326087 exit 0>]
|
|
95
95
|
#
|
|
96
|
-
# * If entry
|
|
97
|
-
# streams are set to binary mode.
|
|
96
|
+
# * If entry <code>options[:binmode]</code> exists, the entry is removed and
|
|
97
|
+
# the internal streams are set to binary mode.
|
|
98
98
|
#
|
|
99
99
|
# The single required argument is one of the following:
|
|
100
100
|
#
|
|
@@ -102,7 +102,7 @@ module Open3
|
|
|
102
102
|
# word or special built-in, or if it contains one or more metacharacters.
|
|
103
103
|
# * `exe_path` otherwise.
|
|
104
104
|
#
|
|
105
|
-
#
|
|
105
|
+
# <strong>Argument `command_line`</strong>
|
|
106
106
|
#
|
|
107
107
|
# String argument `command_line` is a command line to be passed to a shell; it
|
|
108
108
|
# must begin with a shell reserved word, begin with a special built-in, or
|
|
@@ -120,7 +120,7 @@ module Open3
|
|
|
120
120
|
# Open3.capture2('echo "Foo"')
|
|
121
121
|
# # => ["Foo\n", #<Process::Status: pid 2326183 exit 0>]
|
|
122
122
|
#
|
|
123
|
-
#
|
|
123
|
+
# <strong>Argument `exe_path`</strong>
|
|
124
124
|
#
|
|
125
125
|
# Argument `exe_path` is one of the following:
|
|
126
126
|
#
|
|
@@ -159,10 +159,10 @@ module Open3
|
|
|
159
159
|
# (except for certain entries in hash `options`; see below).
|
|
160
160
|
# * Returns as string `stdout_and_stderr_s` the merged standard output and
|
|
161
161
|
# standard error of the child process.
|
|
162
|
-
# * Returns as `status` a
|
|
163
|
-
# status of the child process.
|
|
162
|
+
# * Returns as `status` a <code>Process::Status</code> object that represents
|
|
163
|
+
# the exit status of the child process.
|
|
164
164
|
#
|
|
165
|
-
# Returns the array
|
|
165
|
+
# Returns the array <code>[stdout_and_stderr_s, status]</code>:
|
|
166
166
|
#
|
|
167
167
|
# stdout_and_stderr_s, status = Open3.capture2e('echo "Foo"')
|
|
168
168
|
# # => ["Foo\n", #<Process::Status: pid 2371692 exit 0>]
|
|
@@ -185,14 +185,14 @@ module Open3
|
|
|
185
185
|
# The hash `options` is given; two options have local effect in method
|
|
186
186
|
# Open3.capture2e:
|
|
187
187
|
#
|
|
188
|
-
# * If entry
|
|
189
|
-
# string value is sent to the command's standard input:
|
|
188
|
+
# * If entry <code>options[:stdin_data]</code> exists, the entry is removed
|
|
189
|
+
# and its string value is sent to the command's standard input:
|
|
190
190
|
#
|
|
191
191
|
# Open3.capture2e('tee', stdin_data: 'Foo')
|
|
192
192
|
# # => ["Foo", #<Process::Status: pid 2371732 exit 0>]
|
|
193
193
|
#
|
|
194
|
-
# * If entry
|
|
195
|
-
# streams are set to binary mode.
|
|
194
|
+
# * If entry <code>options[:binmode]</code> exists, the entry is removed and
|
|
195
|
+
# the internal streams are set to binary mode.
|
|
196
196
|
#
|
|
197
197
|
# The single required argument is one of the following:
|
|
198
198
|
#
|
|
@@ -200,7 +200,7 @@ module Open3
|
|
|
200
200
|
# word or special built-in, or if it contains one or more metacharacters.
|
|
201
201
|
# * `exe_path` otherwise.
|
|
202
202
|
#
|
|
203
|
-
#
|
|
203
|
+
# <strong>Argument `command_line`</strong>
|
|
204
204
|
#
|
|
205
205
|
# String argument `command_line` is a command line to be passed to a shell; it
|
|
206
206
|
# must begin with a shell reserved word, begin with a special built-in, or
|
|
@@ -218,7 +218,7 @@ module Open3
|
|
|
218
218
|
# Open3.capture2e('echo "Foo"')
|
|
219
219
|
# # => ["Foo\n", #<Process::Status: pid 2326183 exit 0>]
|
|
220
220
|
#
|
|
221
|
-
#
|
|
221
|
+
# <strong>Argument `exe_path`</strong>
|
|
222
222
|
#
|
|
223
223
|
# Argument `exe_path` is one of the following:
|
|
224
224
|
#
|
|
@@ -257,10 +257,10 @@ module Open3
|
|
|
257
257
|
# (except for certain entries in hash `options`; see below).
|
|
258
258
|
# * Returns as strings `stdout_s` and `stderr_s` the standard output and
|
|
259
259
|
# standard error of the child process.
|
|
260
|
-
# * Returns as `status` a
|
|
261
|
-
# status of the child process.
|
|
260
|
+
# * Returns as `status` a <code>Process::Status</code> object that represents
|
|
261
|
+
# the exit status of the child process.
|
|
262
262
|
#
|
|
263
|
-
# Returns the array
|
|
263
|
+
# Returns the array <code>[stdout_s, stderr_s, status]</code>:
|
|
264
264
|
#
|
|
265
265
|
# stdout_s, stderr_s, status = Open3.capture3('echo "Foo"')
|
|
266
266
|
# # => ["Foo\n", "", #<Process::Status: pid 2281954 exit 0>]
|
|
@@ -283,14 +283,14 @@ module Open3
|
|
|
283
283
|
# The hash `options` is given; two options have local effect in method
|
|
284
284
|
# Open3.capture3:
|
|
285
285
|
#
|
|
286
|
-
# * If entry
|
|
287
|
-
# string value is sent to the command's standard input:
|
|
286
|
+
# * If entry <code>options[:stdin_data]</code> exists, the entry is removed
|
|
287
|
+
# and its string value is sent to the command's standard input:
|
|
288
288
|
#
|
|
289
289
|
# Open3.capture3('tee', stdin_data: 'Foo')
|
|
290
290
|
# # => ["Foo", "", #<Process::Status: pid 2319575 exit 0>]
|
|
291
291
|
#
|
|
292
|
-
# * If entry
|
|
293
|
-
# streams are set to binary mode.
|
|
292
|
+
# * If entry <code>options[:binmode]</code> exists, the entry is removed and
|
|
293
|
+
# the internal streams are set to binary mode.
|
|
294
294
|
#
|
|
295
295
|
# The single required argument is one of the following:
|
|
296
296
|
#
|
|
@@ -298,7 +298,7 @@ module Open3
|
|
|
298
298
|
# word or special built-in, or if it contains one or more metacharacters.
|
|
299
299
|
# * `exe_path` otherwise.
|
|
300
300
|
#
|
|
301
|
-
#
|
|
301
|
+
# <strong>Argument `command_line`</strong>
|
|
302
302
|
#
|
|
303
303
|
# String argument `command_line` is a command line to be passed to a shell; it
|
|
304
304
|
# must begin with a shell reserved word, begin with a special built-in, or
|
|
@@ -316,7 +316,7 @@ module Open3
|
|
|
316
316
|
# Open3.capture3('echo "Foo"')
|
|
317
317
|
# # => ["Foo\n", "", #<Process::Status: pid 2282092 exit 0>]
|
|
318
318
|
#
|
|
319
|
-
#
|
|
319
|
+
# <strong>Argument `exe_path`</strong>
|
|
320
320
|
#
|
|
321
321
|
# Argument `exe_path` is one of the following:
|
|
322
322
|
#
|
|
@@ -361,8 +361,8 @@ module Open3
|
|
|
361
361
|
# thread has method `pid`, which returns the process ID of the child
|
|
362
362
|
# process.
|
|
363
363
|
#
|
|
364
|
-
# With no block given, returns the array
|
|
365
|
-
# caller should close each of the two returned streams.
|
|
364
|
+
# With no block given, returns the array <code>[stdin, stdout,
|
|
365
|
+
# wait_thread]</code>. The caller should close each of the two returned streams.
|
|
366
366
|
#
|
|
367
367
|
# stdin, stdout, wait_thread = Open3.popen2('echo')
|
|
368
368
|
# # => [#<IO:fd 6>, #<IO:fd 7>, #<Process::Waiter:0x00007f58d52dbe98 run>]
|
|
@@ -412,7 +412,7 @@ module Open3
|
|
|
412
412
|
# word or special built-in, or if it contains one or more metacharacters.
|
|
413
413
|
# * `exe_path` otherwise.
|
|
414
414
|
#
|
|
415
|
-
#
|
|
415
|
+
# <strong>Argument `command_line`</strong>
|
|
416
416
|
#
|
|
417
417
|
# String argument `command_line` is a command line to be passed to a shell; it
|
|
418
418
|
# must begin with a shell reserved word, begin with a special built-in, or
|
|
@@ -431,7 +431,7 @@ module Open3
|
|
|
431
431
|
# Open3.popen2('echo "Foo"') { |i, o, t| o.gets }
|
|
432
432
|
# "Foo\n"
|
|
433
433
|
#
|
|
434
|
-
#
|
|
434
|
+
# <strong>Argument `exe_path`</strong>
|
|
435
435
|
#
|
|
436
436
|
# Argument `exe_path` is one of the following:
|
|
437
437
|
#
|
|
@@ -486,8 +486,9 @@ module Open3
|
|
|
486
486
|
# thread has method `pid`, which returns the process ID of the child
|
|
487
487
|
# process.
|
|
488
488
|
#
|
|
489
|
-
# With no block given, returns the array
|
|
490
|
-
# The caller should close each of the three returned
|
|
489
|
+
# With no block given, returns the array <code>[stdin, stdout, stderr,
|
|
490
|
+
# wait_thread]</code>. The caller should close each of the three returned
|
|
491
|
+
# streams.
|
|
491
492
|
#
|
|
492
493
|
# stdin, stdout, stderr, wait_thread = Open3.popen3('echo')
|
|
493
494
|
# # => [#<IO:fd 8>, #<IO:fd 10>, #<IO:fd 12>, #<Process::Waiter:0x00007f58d5428f58 run>]
|
|
@@ -540,7 +541,7 @@ module Open3
|
|
|
540
541
|
# word or special built-in, or if it contains one or more metacharacters.
|
|
541
542
|
# * `exe_path` otherwise.
|
|
542
543
|
#
|
|
543
|
-
#
|
|
544
|
+
# <strong>Argument `command_line`</strong>
|
|
544
545
|
#
|
|
545
546
|
# String argument `command_line` is a command line to be passed to a shell; it
|
|
546
547
|
# must begin with a shell reserved word, begin with a special built-in, or
|
|
@@ -559,7 +560,7 @@ module Open3
|
|
|
559
560
|
# Open3.popen3('echo "Foo"') { |i, o, e, t| o.gets }
|
|
560
561
|
# "Foo\n"
|
|
561
562
|
#
|
|
562
|
-
#
|
|
563
|
+
# <strong>Argument `exe_path`</strong>
|
|
563
564
|
#
|
|
564
565
|
# Argument `exe_path` is one of the following:
|
|
565
566
|
#
|