steep 0.11.1 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +27 -0
- data/.gitmodules +3 -0
- data/CHANGELOG.md +5 -0
- data/README.md +48 -90
- data/Rakefile +10 -6
- data/Steepfile +1 -0
- data/bin/setup +1 -0
- data/bin/smoke_runner.rb +9 -14
- data/exe/rbs +3 -0
- data/exe/ruby-signature +3 -0
- data/exe/steep +1 -0
- data/lib/steep.rb +32 -26
- data/lib/steep/annotation_parser.rb +167 -0
- data/lib/steep/ast/annotation/collection.rb +7 -7
- data/lib/steep/ast/types.rb +60 -0
- data/lib/steep/ast/types/any.rb +1 -1
- data/lib/steep/ast/types/factory.rb +535 -0
- data/lib/steep/ast/types/name.rb +3 -3
- data/lib/steep/ast/types/var.rb +1 -1
- data/lib/steep/cli.rb +56 -240
- data/lib/steep/drivers/annotations.rb +36 -19
- data/lib/steep/drivers/check.rb +55 -91
- data/lib/steep/drivers/init.rb +54 -0
- data/lib/steep/drivers/langserver.rb +241 -150
- data/lib/steep/drivers/print_project.rb +56 -0
- data/lib/steep/drivers/signature_error_printer.rb +25 -0
- data/lib/steep/drivers/trace_printer.rb +25 -0
- data/lib/steep/drivers/utils/driver_helper.rb +26 -0
- data/lib/steep/drivers/validate.rb +18 -38
- data/lib/steep/drivers/vendor.rb +46 -0
- data/lib/steep/drivers/watch.rb +78 -140
- data/lib/steep/errors.rb +22 -13
- data/lib/steep/interface/interface.rb +91 -0
- data/lib/steep/interface/method.rb +0 -4
- data/lib/steep/interface/method_type.rb +362 -2
- data/lib/steep/interface/substitution.rb +22 -0
- data/lib/steep/project.rb +25 -233
- data/lib/steep/project/dsl.rb +132 -0
- data/lib/steep/project/file.rb +93 -76
- data/lib/steep/project/file_loader.rb +63 -0
- data/lib/steep/project/options.rb +7 -0
- data/lib/steep/project/target.rb +190 -0
- data/lib/steep/signature/errors.rb +25 -77
- data/lib/steep/signature/validator.rb +122 -0
- data/lib/steep/source.rb +12 -7
- data/lib/steep/subtyping/check.rb +357 -633
- data/lib/steep/subtyping/constraints.rb +2 -2
- data/lib/steep/subtyping/trace.rb +23 -0
- data/lib/steep/type_construction.rb +509 -455
- data/lib/steep/type_inference/constant_env.rb +16 -24
- data/lib/steep/type_inference/type_env.rb +26 -18
- data/lib/steep/version.rb +1 -1
- data/sample/Steepfile +6 -0
- data/sample/lib/conference.rb +12 -0
- data/sample/sig/conference.rbs +6 -0
- data/smoke/alias/Steepfile +4 -0
- data/smoke/alias/a.rb +2 -2
- data/smoke/alias/{a.rbi → a.rbs} +1 -1
- data/smoke/and/Steepfile +4 -0
- data/smoke/array/Steepfile +4 -0
- data/smoke/array/a.rb +2 -2
- data/smoke/array/b.rb +4 -4
- data/smoke/array/c.rb +2 -2
- data/smoke/block/Steepfile +5 -0
- data/smoke/block/{a.rbi → a.rbs} +1 -1
- data/smoke/block/{c.rbi → c.rbs} +0 -0
- data/smoke/block/d.rb +6 -6
- data/smoke/case/Steepfile +4 -0
- data/smoke/case/a.rb +4 -3
- data/smoke/class/Steepfile +4 -0
- data/smoke/class/a.rb +1 -4
- data/smoke/class/a.rbs +24 -0
- data/smoke/class/h.rb +6 -2
- data/smoke/class/{h.rbi → h.rbs} +1 -2
- data/smoke/class/i.rb +1 -2
- data/smoke/class/i.rbs +9 -0
- data/smoke/const/Steepfile +4 -0
- data/smoke/dstr/Steepfile +4 -0
- data/smoke/ensure/Steepfile +4 -0
- data/smoke/ensure/a.rb +1 -1
- data/smoke/enumerator/Steepfile +4 -0
- data/smoke/enumerator/a.rb +7 -7
- data/smoke/enumerator/b.rb +6 -6
- data/smoke/extension/Steepfile +4 -0
- data/smoke/extension/{a.rbi → a.rbs} +2 -2
- data/smoke/extension/{e.rbi → e.rbs} +2 -2
- data/smoke/hash/Steepfile +4 -0
- data/smoke/hash/{a.rbi → a.rbs} +0 -0
- data/smoke/hash/b.rb +2 -2
- data/smoke/hash/c.rb +1 -1
- data/smoke/hash/e.rbs +3 -0
- data/smoke/hash/f.rb +1 -1
- data/smoke/hello/Steepfile +4 -0
- data/smoke/hello/hello.rbs +7 -0
- data/smoke/if/Steepfile +4 -0
- data/smoke/implements/Steepfile +4 -0
- data/smoke/implements/a.rbs +6 -0
- data/smoke/initialize/Steepfile +4 -0
- data/smoke/initialize/a.rbs +3 -0
- data/smoke/integer/Steepfile +4 -0
- data/smoke/integer/a.rb +5 -3
- data/smoke/interface/Steepfile +4 -0
- data/smoke/interface/{a.rbi → a.rbs} +0 -0
- data/smoke/kwbegin/Steepfile +4 -0
- data/smoke/lambda/Steepfile +4 -0
- data/smoke/lambda/a.rb +9 -2
- data/smoke/literal/Steepfile +4 -0
- data/smoke/literal/{literal_methods.rbi → literal_methods.rbs} +0 -0
- data/smoke/map/Steepfile +4 -0
- data/smoke/map/a.rb +1 -1
- data/smoke/method/Steepfile +4 -0
- data/smoke/method/{a.rbi → a.rbs} +0 -0
- data/smoke/method/b.rb +1 -4
- data/smoke/method/d.rb +1 -0
- data/smoke/method/d.rbs +3 -0
- data/smoke/module/Steepfile +4 -0
- data/smoke/module/a.rb +1 -1
- data/smoke/module/a.rbs +16 -0
- data/smoke/module/c.rb +1 -1
- data/smoke/regexp/Steepfile +4 -0
- data/smoke/regexp/a.rb +2 -2
- data/smoke/regexp/b.rb +16 -16
- data/smoke/regression/Steepfile +5 -0
- data/smoke/regression/array.rb +2 -2
- data/smoke/regression/hash.rb +2 -2
- data/smoke/regression/poly_new.rb +2 -0
- data/smoke/regression/poly_new.rbs +4 -0
- data/smoke/regression/set_divide.rb +2 -2
- data/smoke/rescue/Steepfile +4 -0
- data/smoke/rescue/a.rb +1 -1
- data/smoke/self/Steepfile +4 -0
- data/smoke/self/a.rbs +4 -0
- data/smoke/skip/Steepfile +4 -0
- data/smoke/stdout/Steepfile +4 -0
- data/smoke/stdout/{a.rbi → a.rbs} +1 -1
- data/smoke/super/Steepfile +4 -0
- data/smoke/super/a.rbs +10 -0
- data/smoke/type_case/Steepfile +4 -0
- data/smoke/type_case/a.rb +1 -1
- data/smoke/yield/Steepfile +4 -0
- data/smoke/yield/a.rb +2 -2
- data/steep.gemspec +14 -7
- data/vendor/ruby-signature/.github/workflows/ruby.yml +27 -0
- data/vendor/ruby-signature/.gitignore +12 -0
- data/vendor/ruby-signature/.rubocop.yml +15 -0
- data/vendor/ruby-signature/BSDL +22 -0
- data/vendor/ruby-signature/COPYING +56 -0
- data/vendor/ruby-signature/Gemfile +6 -0
- data/vendor/ruby-signature/README.md +93 -0
- data/vendor/ruby-signature/Rakefile +66 -0
- data/vendor/ruby-signature/bin/annotate-with-rdoc +156 -0
- data/vendor/ruby-signature/bin/console +14 -0
- data/vendor/ruby-signature/bin/query-rdoc +103 -0
- data/vendor/ruby-signature/bin/setup +10 -0
- data/vendor/ruby-signature/bin/sort +88 -0
- data/vendor/ruby-signature/bin/test_runner.rb +17 -0
- data/vendor/ruby-signature/docs/CONTRIBUTING.md +97 -0
- data/vendor/ruby-signature/docs/sigs.md +148 -0
- data/vendor/ruby-signature/docs/stdlib.md +152 -0
- data/vendor/ruby-signature/docs/syntax.md +528 -0
- data/vendor/ruby-signature/exe/rbs +3 -0
- data/vendor/ruby-signature/exe/ruby-signature +7 -0
- data/vendor/ruby-signature/lib/ruby/signature.rb +64 -0
- data/vendor/ruby-signature/lib/ruby/signature/ast/annotation.rb +29 -0
- data/vendor/ruby-signature/lib/ruby/signature/ast/comment.rb +29 -0
- data/vendor/ruby-signature/lib/ruby/signature/ast/declarations.rb +391 -0
- data/vendor/ruby-signature/lib/ruby/signature/ast/members.rb +364 -0
- data/vendor/ruby-signature/lib/ruby/signature/buffer.rb +52 -0
- data/vendor/ruby-signature/lib/ruby/signature/builtin_names.rb +54 -0
- data/vendor/ruby-signature/lib/ruby/signature/cli.rb +534 -0
- data/vendor/ruby-signature/lib/ruby/signature/constant.rb +28 -0
- data/vendor/ruby-signature/lib/ruby/signature/constant_table.rb +152 -0
- data/vendor/ruby-signature/lib/ruby/signature/definition.rb +172 -0
- data/vendor/ruby-signature/lib/ruby/signature/definition_builder.rb +921 -0
- data/vendor/ruby-signature/lib/ruby/signature/environment.rb +283 -0
- data/vendor/ruby-signature/lib/ruby/signature/environment_loader.rb +138 -0
- data/vendor/ruby-signature/lib/ruby/signature/environment_walker.rb +126 -0
- data/vendor/ruby-signature/lib/ruby/signature/errors.rb +189 -0
- data/vendor/ruby-signature/lib/ruby/signature/location.rb +104 -0
- data/vendor/ruby-signature/lib/ruby/signature/method_type.rb +125 -0
- data/vendor/ruby-signature/lib/ruby/signature/namespace.rb +93 -0
- data/vendor/ruby-signature/lib/ruby/signature/parser.y +1343 -0
- data/vendor/ruby-signature/lib/ruby/signature/prototype/rb.rb +441 -0
- data/vendor/ruby-signature/lib/ruby/signature/prototype/rbi.rb +579 -0
- data/vendor/ruby-signature/lib/ruby/signature/prototype/runtime.rb +383 -0
- data/vendor/ruby-signature/lib/ruby/signature/substitution.rb +48 -0
- data/vendor/ruby-signature/lib/ruby/signature/test.rb +28 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/errors.rb +63 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/hook.rb +290 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/setup.rb +58 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/spy.rb +324 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/test_helper.rb +185 -0
- data/vendor/ruby-signature/lib/ruby/signature/test/type_check.rb +256 -0
- data/vendor/ruby-signature/lib/ruby/signature/type_name.rb +72 -0
- data/vendor/ruby-signature/lib/ruby/signature/types.rb +932 -0
- data/vendor/ruby-signature/lib/ruby/signature/variance_calculator.rb +140 -0
- data/vendor/ruby-signature/lib/ruby/signature/vendorer.rb +49 -0
- data/vendor/ruby-signature/lib/ruby/signature/version.rb +5 -0
- data/vendor/ruby-signature/lib/ruby/signature/writer.rb +271 -0
- data/vendor/ruby-signature/ruby-signature.gemspec +45 -0
- data/vendor/ruby-signature/stdlib/abbrev/abbrev.rbs +3 -0
- data/vendor/ruby-signature/stdlib/base64/base64.rbs +15 -0
- data/vendor/ruby-signature/stdlib/builtin/array.rbs +1997 -0
- data/vendor/ruby-signature/stdlib/builtin/basic_object.rbs +280 -0
- data/vendor/ruby-signature/stdlib/builtin/binding.rbs +177 -0
- data/vendor/ruby-signature/stdlib/builtin/builtin.rbs +35 -0
- data/vendor/ruby-signature/stdlib/builtin/class.rbs +145 -0
- data/vendor/ruby-signature/stdlib/builtin/comparable.rbs +116 -0
- data/vendor/ruby-signature/stdlib/builtin/complex.rbs +400 -0
- data/vendor/ruby-signature/stdlib/builtin/constants.rbs +37 -0
- data/vendor/ruby-signature/stdlib/builtin/data.rbs +5 -0
- data/vendor/ruby-signature/stdlib/builtin/deprecated.rbs +2 -0
- data/vendor/ruby-signature/stdlib/builtin/dir.rbs +419 -0
- data/vendor/ruby-signature/stdlib/builtin/encoding.rbs +606 -0
- data/vendor/ruby-signature/stdlib/builtin/enumerable.rbs +404 -0
- data/vendor/ruby-signature/stdlib/builtin/enumerator.rbs +260 -0
- data/vendor/ruby-signature/stdlib/builtin/errno.rbs +781 -0
- data/vendor/ruby-signature/stdlib/builtin/errors.rbs +582 -0
- data/vendor/ruby-signature/stdlib/builtin/exception.rbs +193 -0
- data/vendor/ruby-signature/stdlib/builtin/false_class.rbs +40 -0
- data/vendor/ruby-signature/stdlib/builtin/fiber.rbs +68 -0
- data/vendor/ruby-signature/stdlib/builtin/fiber_error.rbs +12 -0
- data/vendor/ruby-signature/stdlib/builtin/file.rbs +476 -0
- data/vendor/ruby-signature/stdlib/builtin/file_test.rbs +59 -0
- data/vendor/ruby-signature/stdlib/builtin/float.rbs +696 -0
- data/vendor/ruby-signature/stdlib/builtin/gc.rbs +121 -0
- data/vendor/ruby-signature/stdlib/builtin/hash.rbs +1029 -0
- data/vendor/ruby-signature/stdlib/builtin/integer.rbs +710 -0
- data/vendor/ruby-signature/stdlib/builtin/io.rbs +683 -0
- data/vendor/ruby-signature/stdlib/builtin/kernel.rbs +574 -0
- data/vendor/ruby-signature/stdlib/builtin/marshal.rbs +135 -0
- data/vendor/ruby-signature/stdlib/builtin/match_data.rbs +141 -0
- data/vendor/ruby-signature/stdlib/builtin/math.rbs +66 -0
- data/vendor/ruby-signature/stdlib/builtin/method.rbs +182 -0
- data/vendor/ruby-signature/stdlib/builtin/module.rbs +248 -0
- data/vendor/ruby-signature/stdlib/builtin/nil_class.rbs +82 -0
- data/vendor/ruby-signature/stdlib/builtin/numeric.rbs +409 -0
- data/vendor/ruby-signature/stdlib/builtin/object.rbs +824 -0
- data/vendor/ruby-signature/stdlib/builtin/proc.rbs +426 -0
- data/vendor/ruby-signature/stdlib/builtin/process.rbs +354 -0
- data/vendor/ruby-signature/stdlib/builtin/random.rbs +93 -0
- data/vendor/ruby-signature/stdlib/builtin/range.rbs +226 -0
- data/vendor/ruby-signature/stdlib/builtin/rational.rbs +424 -0
- data/vendor/ruby-signature/stdlib/builtin/rb_config.rbs +10 -0
- data/vendor/ruby-signature/stdlib/builtin/regexp.rbs +131 -0
- data/vendor/ruby-signature/stdlib/builtin/ruby_vm.rbs +14 -0
- data/vendor/ruby-signature/stdlib/builtin/signal.rbs +55 -0
- data/vendor/ruby-signature/stdlib/builtin/string.rbs +770 -0
- data/vendor/ruby-signature/stdlib/builtin/string_io.rbs +13 -0
- data/vendor/ruby-signature/stdlib/builtin/struct.rbs +40 -0
- data/vendor/ruby-signature/stdlib/builtin/symbol.rbs +230 -0
- data/vendor/ruby-signature/stdlib/builtin/thread.rbs +1112 -0
- data/vendor/ruby-signature/stdlib/builtin/thread_group.rbs +23 -0
- data/vendor/ruby-signature/stdlib/builtin/time.rbs +739 -0
- data/vendor/ruby-signature/stdlib/builtin/trace_point.rbs +91 -0
- data/vendor/ruby-signature/stdlib/builtin/true_class.rbs +46 -0
- data/vendor/ruby-signature/stdlib/builtin/unbound_method.rbs +159 -0
- data/vendor/ruby-signature/stdlib/builtin/warning.rbs +17 -0
- data/vendor/ruby-signature/stdlib/erb/erb.rbs +18 -0
- data/vendor/ruby-signature/stdlib/find/find.rbs +44 -0
- data/vendor/ruby-signature/stdlib/pathname/pathname.rbs +21 -0
- data/vendor/ruby-signature/stdlib/prime/integer-extension.rbs +23 -0
- data/vendor/ruby-signature/stdlib/prime/prime.rbs +188 -0
- data/vendor/ruby-signature/stdlib/securerandom/securerandom.rbs +9 -0
- data/vendor/ruby-signature/stdlib/set/set.rbs +77 -0
- data/vendor/ruby-signature/stdlib/tmpdir/tmpdir.rbs +53 -0
- metadata +244 -54
- data/.travis.yml +0 -7
- data/lib/steep/ast/signature/alias.rb +0 -19
- data/lib/steep/ast/signature/class.rb +0 -33
- data/lib/steep/ast/signature/const.rb +0 -17
- data/lib/steep/ast/signature/env.rb +0 -138
- data/lib/steep/ast/signature/extension.rb +0 -21
- data/lib/steep/ast/signature/gvar.rb +0 -17
- data/lib/steep/ast/signature/interface.rb +0 -31
- data/lib/steep/ast/signature/members.rb +0 -115
- data/lib/steep/ast/signature/module.rb +0 -21
- data/lib/steep/drivers/print_interface.rb +0 -94
- data/lib/steep/drivers/scaffold.rb +0 -321
- data/lib/steep/drivers/utils/each_signature.rb +0 -31
- data/lib/steep/interface/abstract.rb +0 -68
- data/lib/steep/interface/builder.rb +0 -637
- data/lib/steep/interface/instantiated.rb +0 -163
- data/lib/steep/interface/ivar_chain.rb +0 -26
- data/lib/steep/parser.y +0 -1278
- data/lib/steep/project/listener.rb +0 -53
- data/smoke/class/a.rbi +0 -24
- data/smoke/class/d.rb +0 -9
- data/smoke/class/e.rb +0 -12
- data/smoke/class/i.rbi +0 -9
- data/smoke/hash/e.rbi +0 -3
- data/smoke/hello/hello.rbi +0 -7
- data/smoke/implements/a.rbi +0 -6
- data/smoke/initialize/a.rbi +0 -3
- data/smoke/module/a.rbi +0 -16
- data/smoke/self/a.rbi +0 -4
- data/smoke/super/a.rbi +0 -10
- data/stdlib/builtin.rbi +0 -787
@@ -0,0 +1,683 @@
|
|
1
|
+
# The [IO](IO) class is the basis for all input and
|
2
|
+
# output in Ruby. An I/O stream may be *duplexed* (that is,
|
3
|
+
# bidirectional), and so may use more than one native operating system
|
4
|
+
# stream.
|
5
|
+
#
|
6
|
+
# Many of the examples in this section use the
|
7
|
+
# [File](https://ruby-doc.org/core-2.6.3/File.html) class, the only
|
8
|
+
# standard subclass of [IO](IO). The two classes are
|
9
|
+
# closely associated. Like the
|
10
|
+
# [File](https://ruby-doc.org/core-2.6.3/File.html) class, the Socket
|
11
|
+
# library subclasses from [IO](IO) (such as TCPSocket
|
12
|
+
# or UDPSocket).
|
13
|
+
#
|
14
|
+
# The
|
15
|
+
# [Kernel\#open](https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-open)
|
16
|
+
# method can create an [IO](IO) (or
|
17
|
+
# [File](https://ruby-doc.org/core-2.6.3/File.html) ) object for these
|
18
|
+
# types of arguments:
|
19
|
+
#
|
20
|
+
# - A plain string represents a filename suitable for the underlying
|
21
|
+
# operating system.
|
22
|
+
#
|
23
|
+
# - A string starting with `"|"` indicates a subprocess. The remainder
|
24
|
+
# of the string following the `"|"` is invoked as a process with
|
25
|
+
# appropriate input/output channels connected to it.
|
26
|
+
#
|
27
|
+
# - A string equal to `"|-"` will create another Ruby instance as a
|
28
|
+
# subprocess.
|
29
|
+
#
|
30
|
+
# The [IO](IO) may be opened with different file modes
|
31
|
+
# (read-only, write-only) and encodings for proper conversion. See
|
32
|
+
# [::new](IO#method-c-new) for these options. See
|
33
|
+
# [Kernel\#open](https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-open)
|
34
|
+
# for details of the various command formats described above.
|
35
|
+
#
|
36
|
+
# [::popen](IO#method-c-popen), the Open3 library, or
|
37
|
+
# Process\#spawn may also be used to communicate with subprocesses through
|
38
|
+
# an [IO](IO).
|
39
|
+
#
|
40
|
+
# Ruby will convert pathnames between different operating system
|
41
|
+
# conventions if possible. For instance, on a Windows system the filename
|
42
|
+
# `"/gumby/ruby/test.rb"` will be opened as `"\gumby\ruby\test.rb"` . When
|
43
|
+
# specifying a Windows-style filename in a Ruby string, remember to escape
|
44
|
+
# the backslashes:
|
45
|
+
#
|
46
|
+
# ```ruby
|
47
|
+
# "C:\\gumby\\ruby\\test.rb"
|
48
|
+
# ```
|
49
|
+
#
|
50
|
+
# Our examples here will use the Unix-style forward slashes;
|
51
|
+
# File::ALT\_SEPARATOR can be used to get the platform-specific separator
|
52
|
+
# character.
|
53
|
+
#
|
54
|
+
# The global constant [ARGF](https://ruby-doc.org/core-2.6.3/ARGF.html)
|
55
|
+
# (also accessible as `$<` ) provides an IO-like stream which allows
|
56
|
+
# access to all files mentioned on the command line (or STDIN if no files
|
57
|
+
# are mentioned).
|
58
|
+
# [ARGF\#path](https://ruby-doc.org/core-2.6.3/ARGF.html#method-i-path)
|
59
|
+
# and its alias
|
60
|
+
# [ARGF\#filename](https://ruby-doc.org/core-2.6.3/ARGF.html#method-i-filename)
|
61
|
+
# are provided to access the name of the file currently being read.
|
62
|
+
#
|
63
|
+
#
|
64
|
+
# The io/console extension provides methods for interacting with the
|
65
|
+
# console. The console can be accessed from IO.console or the standard
|
66
|
+
# input/output/error [IO](IO) objects.
|
67
|
+
#
|
68
|
+
# Requiring io/console adds the following methods:
|
69
|
+
#
|
70
|
+
# - IO::console
|
71
|
+
#
|
72
|
+
# - IO\#raw
|
73
|
+
#
|
74
|
+
# - IO\#raw\!
|
75
|
+
#
|
76
|
+
# - IO\#cooked
|
77
|
+
#
|
78
|
+
# - IO\#cooked\!
|
79
|
+
#
|
80
|
+
# - IO\#getch
|
81
|
+
#
|
82
|
+
# - IO\#echo=
|
83
|
+
#
|
84
|
+
# - IO\#echo?
|
85
|
+
#
|
86
|
+
# - IO\#noecho
|
87
|
+
#
|
88
|
+
# - IO\#winsize
|
89
|
+
#
|
90
|
+
# - IO\#winsize=
|
91
|
+
#
|
92
|
+
# - IO\#iflush
|
93
|
+
#
|
94
|
+
# - IO\#ioflush
|
95
|
+
#
|
96
|
+
# - IO\#oflush
|
97
|
+
#
|
98
|
+
# Example:
|
99
|
+
#
|
100
|
+
# ```ruby
|
101
|
+
# require 'io/console'
|
102
|
+
# rows, columns = $stdout.winsize
|
103
|
+
# puts "Your screen is #{columns} wide and #{rows} tall"
|
104
|
+
# ```
|
105
|
+
class IO < Object
|
106
|
+
include File::Constants
|
107
|
+
|
108
|
+
include Enumerable[String, IO]
|
109
|
+
|
110
|
+
def <<: (untyped arg0) -> self
|
111
|
+
|
112
|
+
def advise: (Symbol arg0, ?Integer offset, ?Integer len) -> NilClass
|
113
|
+
|
114
|
+
def autoclose=: (bool arg0) -> bool
|
115
|
+
|
116
|
+
# Returns `true` if the underlying file descriptor of *ios* will be closed
|
117
|
+
# automatically at its finalization, otherwise `false` .
|
118
|
+
def autoclose?: () -> bool
|
119
|
+
|
120
|
+
# Puts *ios* into binary mode. Once a stream is in binary mode, it cannot
|
121
|
+
# be reset to nonbinary mode.
|
122
|
+
#
|
123
|
+
# - newline conversion disabled
|
124
|
+
#
|
125
|
+
# - encoding conversion disabled
|
126
|
+
#
|
127
|
+
# - content is treated as ASCII-8BIT
|
128
|
+
def binmode: () -> self
|
129
|
+
|
130
|
+
# Returns `true` if *ios* is binmode.
|
131
|
+
def binmode?: () -> bool
|
132
|
+
|
133
|
+
# Closes *ios* and flushes any pending writes to the operating system. The
|
134
|
+
# stream is unavailable for any further data operations; an `IOError` is
|
135
|
+
# raised if such an attempt is made. I/O streams are automatically closed
|
136
|
+
# when they are claimed by the garbage collector.
|
137
|
+
#
|
138
|
+
# If *ios* is opened by `IO.popen`, `close` sets `$?` .
|
139
|
+
#
|
140
|
+
# Calling this method on closed [IO](IO.downloaded.ruby_doc) object is
|
141
|
+
# just ignored since Ruby 2.3.
|
142
|
+
def close: () -> NilClass
|
143
|
+
|
144
|
+
def close_on_exec=: (bool arg0) -> bool
|
145
|
+
|
146
|
+
# Returns `true` if *ios* will be closed on exec.
|
147
|
+
#
|
148
|
+
# ```ruby
|
149
|
+
# f = open("/dev/null")
|
150
|
+
# f.close_on_exec? #=> false
|
151
|
+
# f.close_on_exec = true
|
152
|
+
# f.close_on_exec? #=> true
|
153
|
+
# f.close_on_exec = false
|
154
|
+
# f.close_on_exec? #=> false
|
155
|
+
# ```
|
156
|
+
def close_on_exec?: () -> bool
|
157
|
+
|
158
|
+
# Closes the read end of a duplex I/O stream (i.e., one that contains both
|
159
|
+
# a read and a write stream, such as a pipe). Will raise an `IOError` if
|
160
|
+
# the stream is not duplexed.
|
161
|
+
#
|
162
|
+
# ```ruby
|
163
|
+
# f = IO.popen("/bin/sh","r+")
|
164
|
+
# f.close_read
|
165
|
+
# f.readlines
|
166
|
+
# ```
|
167
|
+
#
|
168
|
+
# *produces:*
|
169
|
+
#
|
170
|
+
# prog.rb:3:in `readlines': not opened for reading (IOError)
|
171
|
+
# from prog.rb:3
|
172
|
+
#
|
173
|
+
# Calling this method on closed [IO](IO.downloaded.ruby_doc) object is
|
174
|
+
# just ignored since Ruby 2.3.
|
175
|
+
def close_read: () -> NilClass
|
176
|
+
|
177
|
+
# Closes the write end of a duplex I/O stream (i.e., one that contains
|
178
|
+
# both a read and a write stream, such as a pipe). Will raise an `IOError`
|
179
|
+
# if the stream is not duplexed.
|
180
|
+
#
|
181
|
+
# ```ruby
|
182
|
+
# f = IO.popen("/bin/sh","r+")
|
183
|
+
# f.close_write
|
184
|
+
# f.print "nowhere"
|
185
|
+
# ```
|
186
|
+
#
|
187
|
+
# *produces:*
|
188
|
+
#
|
189
|
+
# prog.rb:3:in `write': not opened for writing (IOError)
|
190
|
+
# from prog.rb:3:in `print'
|
191
|
+
# from prog.rb:3
|
192
|
+
#
|
193
|
+
# Calling this method on closed [IO](IO.downloaded.ruby_doc) object is
|
194
|
+
# just ignored since Ruby 2.3.
|
195
|
+
def close_write: () -> NilClass
|
196
|
+
|
197
|
+
# Returns `true` if *ios* is completely closed (for duplex streams, both
|
198
|
+
# reader and writer), `false` otherwise.
|
199
|
+
#
|
200
|
+
# ```ruby
|
201
|
+
# f = File.new("testfile")
|
202
|
+
# f.close #=> nil
|
203
|
+
# f.closed? #=> true
|
204
|
+
# f = IO.popen("/bin/sh","r+")
|
205
|
+
# f.close_write #=> nil
|
206
|
+
# f.closed? #=> false
|
207
|
+
# f.close_read #=> nil
|
208
|
+
# f.closed? #=> true
|
209
|
+
# ```
|
210
|
+
def closed?: () -> bool
|
211
|
+
|
212
|
+
def each: (?String sep, ?Integer limit) { (String arg0) -> untyped } -> self
|
213
|
+
| (?String sep, ?Integer limit) -> ::Enumerator[String, self]
|
214
|
+
|
215
|
+
def each_byte: () { (Integer arg0) -> untyped } -> self
|
216
|
+
| () -> ::Enumerator[Integer, self]
|
217
|
+
|
218
|
+
def each_char: () { (String arg0) -> untyped } -> self
|
219
|
+
| () -> ::Enumerator[String, self]
|
220
|
+
|
221
|
+
def each_codepoint: () { (Integer arg0) -> untyped } -> self
|
222
|
+
| () -> ::Enumerator[Integer, self]
|
223
|
+
|
224
|
+
# Returns true if *ios* is at end of file that means there are no more
|
225
|
+
# data to read. The stream must be opened for reading or an `IOError` will
|
226
|
+
# be raised.
|
227
|
+
#
|
228
|
+
# ```ruby
|
229
|
+
# f = File.new("testfile")
|
230
|
+
# dummy = f.readlines
|
231
|
+
# f.eof #=> true
|
232
|
+
# ```
|
233
|
+
#
|
234
|
+
# If *ios* is a stream such as pipe or socket, `IO#eof?` blocks until the
|
235
|
+
# other end sends some data or closes it.
|
236
|
+
#
|
237
|
+
# ```ruby
|
238
|
+
# r, w = IO.pipe
|
239
|
+
# Thread.new { sleep 1; w.close }
|
240
|
+
# r.eof? #=> true after 1 second blocking
|
241
|
+
#
|
242
|
+
# r, w = IO.pipe
|
243
|
+
# Thread.new { sleep 1; w.puts "a" }
|
244
|
+
# r.eof? #=> false after 1 second blocking
|
245
|
+
#
|
246
|
+
# r, w = IO.pipe
|
247
|
+
# r.eof? # blocks forever
|
248
|
+
# ```
|
249
|
+
#
|
250
|
+
# Note that `IO#eof?` reads data to the input byte buffer. So `IO#sysread`
|
251
|
+
# may not behave as you intend with `IO#eof?`, unless you call
|
252
|
+
# `IO#rewind` first (which is not available for some streams).
|
253
|
+
def eof: () -> bool
|
254
|
+
|
255
|
+
def fcntl: (Integer integer_cmd, String | Integer arg) -> Integer
|
256
|
+
|
257
|
+
# Immediately writes all buffered data in *ios* to disk.
|
258
|
+
#
|
259
|
+
# If the underlying operating system does not support *fdatasync(2)* ,
|
260
|
+
# `IO#fsync` is called instead (which might raise a `NotImplementedError`
|
261
|
+
# ).
|
262
|
+
def fdatasync: () -> Integer?
|
263
|
+
|
264
|
+
# Returns an integer representing the numeric file descriptor for *ios* .
|
265
|
+
#
|
266
|
+
# ```ruby
|
267
|
+
# $stdin.fileno #=> 0
|
268
|
+
# $stdout.fileno #=> 1
|
269
|
+
# ```
|
270
|
+
#
|
271
|
+
#
|
272
|
+
#
|
273
|
+
# Also aliased as: [to\_i](IO.downloaded.ruby_doc#method-i-to_i)
|
274
|
+
def fileno: () -> Integer
|
275
|
+
|
276
|
+
# Flushes any buffered data within *ios* to the underlying operating
|
277
|
+
# system (note that this is Ruby internal buffering only; the OS may
|
278
|
+
# buffer the data as well).
|
279
|
+
#
|
280
|
+
# ```ruby
|
281
|
+
# $stdout.print "no newline"
|
282
|
+
# $stdout.flush
|
283
|
+
# ```
|
284
|
+
#
|
285
|
+
# *produces:*
|
286
|
+
#
|
287
|
+
# ```ruby
|
288
|
+
# no newline
|
289
|
+
# ```
|
290
|
+
def flush: () -> self
|
291
|
+
|
292
|
+
# Immediately writes all buffered data in *ios* to disk. Note that `fsync`
|
293
|
+
# differs from using `IO#sync=` . The latter ensures that data is flushed
|
294
|
+
# from Ruby’s buffers, but does not guarantee that the underlying
|
295
|
+
# operating system actually writes it to disk.
|
296
|
+
#
|
297
|
+
# `NotImplementedError` is raised if the underlying operating system does
|
298
|
+
# not support *fsync(2)* .
|
299
|
+
def fsync: () -> Integer?
|
300
|
+
|
301
|
+
# Gets the next 8-bit byte (0..255) from *ios* . Returns `nil` if called
|
302
|
+
# at end of file.
|
303
|
+
#
|
304
|
+
# ```ruby
|
305
|
+
# f = File.new("testfile")
|
306
|
+
# f.getbyte #=> 84
|
307
|
+
# f.getbyte #=> 104
|
308
|
+
# ```
|
309
|
+
def getbyte: () -> Integer?
|
310
|
+
|
311
|
+
# Reads a one-character string from *ios* . Returns `nil` if called at end
|
312
|
+
# of file.
|
313
|
+
#
|
314
|
+
# ```ruby
|
315
|
+
# f = File.new("testfile")
|
316
|
+
# f.getc #=> "h"
|
317
|
+
# f.getc #=> "e"
|
318
|
+
# ```
|
319
|
+
def getc: () -> String?
|
320
|
+
|
321
|
+
def gets: (?String sep, ?Integer limit) -> String?
|
322
|
+
|
323
|
+
def initialize: (Integer fd, ?Integer mode, ?Integer opt) -> void
|
324
|
+
|
325
|
+
# Return a string describing this [IO](IO.downloaded.ruby_doc) object.
|
326
|
+
def inspect: () -> String
|
327
|
+
|
328
|
+
# Returns the [Encoding](https://ruby-doc.org/core-2.6.3/Encoding.html) of
|
329
|
+
# the internal string if conversion is specified. Otherwise returns `nil`
|
330
|
+
# .
|
331
|
+
def internal_encoding: () -> Encoding
|
332
|
+
|
333
|
+
def ioctl: (Integer integer_cmd, String | Integer arg) -> Integer
|
334
|
+
|
335
|
+
# Returns `true` if *ios* is associated with a terminal device (tty),
|
336
|
+
# `false` otherwise.
|
337
|
+
#
|
338
|
+
# ```ruby
|
339
|
+
# File.new("testfile").isatty #=> false
|
340
|
+
# File.new("/dev/tty").isatty #=> true
|
341
|
+
# ```
|
342
|
+
def isatty: () -> bool
|
343
|
+
|
344
|
+
# Returns the current line number in *ios* . The stream must be opened for
|
345
|
+
# reading. `lineno` counts the number of times
|
346
|
+
# [gets](IO.downloaded.ruby_doc#method-i-gets) is called rather than the
|
347
|
+
# number of newlines encountered. The two values will differ if
|
348
|
+
# [gets](IO.downloaded.ruby_doc#method-i-gets) is called with a separator
|
349
|
+
# other than newline.
|
350
|
+
#
|
351
|
+
# Methods that use `$/` like [each](IO.downloaded.ruby_doc#method-i-each)
|
352
|
+
# , [lines](IO.downloaded.ruby_doc#method-i-lines) and
|
353
|
+
# [readline](IO.downloaded.ruby_doc#method-i-readline) will also increment
|
354
|
+
# `lineno` .
|
355
|
+
#
|
356
|
+
# See also the `$.` variable.
|
357
|
+
#
|
358
|
+
# ```ruby
|
359
|
+
# f = File.new("testfile")
|
360
|
+
# f.lineno #=> 0
|
361
|
+
# f.gets #=> "This is line one\n"
|
362
|
+
# f.lineno #=> 1
|
363
|
+
# f.gets #=> "This is line two\n"
|
364
|
+
# f.lineno #=> 2
|
365
|
+
# ```
|
366
|
+
def lineno: () -> Integer
|
367
|
+
|
368
|
+
def lineno=: (Integer arg0) -> Integer
|
369
|
+
|
370
|
+
# Returns the process ID of a child process associated with *ios* . This
|
371
|
+
# will be set by `IO.popen` .
|
372
|
+
#
|
373
|
+
# ```ruby
|
374
|
+
# pipe = IO.popen("-")
|
375
|
+
# if pipe
|
376
|
+
# $stderr.puts "In parent, child pid is #{pipe.pid}"
|
377
|
+
# else
|
378
|
+
# $stderr.puts "In child, pid is #{$$}"
|
379
|
+
# end
|
380
|
+
# ```
|
381
|
+
#
|
382
|
+
# *produces:*
|
383
|
+
#
|
384
|
+
# In child, pid is 26209
|
385
|
+
# In parent, child pid is 26209
|
386
|
+
def pid: () -> Integer
|
387
|
+
|
388
|
+
# Returns the current offset (in bytes) of *ios* .
|
389
|
+
#
|
390
|
+
# ```ruby
|
391
|
+
# f = File.new("testfile")
|
392
|
+
# f.pos #=> 0
|
393
|
+
# f.gets #=> "This is line one\n"
|
394
|
+
# f.pos #=> 17
|
395
|
+
# ```
|
396
|
+
def pos: () -> Integer
|
397
|
+
|
398
|
+
def pos=: (Integer arg0) -> Integer
|
399
|
+
|
400
|
+
def print: (*untyped arg0) -> NilClass
|
401
|
+
|
402
|
+
def printf: (String format_string, *untyped arg0) -> NilClass
|
403
|
+
|
404
|
+
def putc: (Numeric | String arg0) -> untyped
|
405
|
+
|
406
|
+
def puts: (*untyped arg0) -> NilClass
|
407
|
+
|
408
|
+
def read: (?Integer length, ?String outbuf) -> String?
|
409
|
+
|
410
|
+
def read_nonblock: (Integer len) -> String
|
411
|
+
| (Integer len, ?String buf) -> String
|
412
|
+
|
413
|
+
# Reads a byte as with `IO#getbyte`, but raises an `EOFError` on end of
|
414
|
+
# file.
|
415
|
+
def readbyte: () -> Integer
|
416
|
+
|
417
|
+
# Reads a one-character string from *ios* . Raises an `EOFError` on end of
|
418
|
+
# file.
|
419
|
+
#
|
420
|
+
# ```ruby
|
421
|
+
# f = File.new("testfile")
|
422
|
+
# f.readchar #=> "h"
|
423
|
+
# f.readchar #=> "e"
|
424
|
+
# ```
|
425
|
+
def readchar: () -> String
|
426
|
+
|
427
|
+
def readline: (?String sep, ?Integer limit) -> String
|
428
|
+
|
429
|
+
def readlines: (?String sep, ?Integer limit) -> ::Array[String]
|
430
|
+
|
431
|
+
def readpartial: (Integer maxlen) -> String
|
432
|
+
| (Integer maxlen, ?String outbuf) -> String
|
433
|
+
|
434
|
+
def reopen: (IO other_IO_or_path) -> IO
|
435
|
+
| (String other_IO_or_path, ?String mode_str) -> IO
|
436
|
+
|
437
|
+
# Positions *ios* to the beginning of input, resetting `lineno` to zero.
|
438
|
+
#
|
439
|
+
# ```ruby
|
440
|
+
# f = File.new("testfile")
|
441
|
+
# f.readline #=> "This is line one\n"
|
442
|
+
# f.rewind #=> 0
|
443
|
+
# f.lineno #=> 0
|
444
|
+
# f.readline #=> "This is line one\n"
|
445
|
+
# ```
|
446
|
+
#
|
447
|
+
# Note that it cannot be used with streams such as pipes, ttys, and
|
448
|
+
# sockets.
|
449
|
+
def rewind: () -> Integer
|
450
|
+
|
451
|
+
def seek: (Integer amount, ?Integer whence) -> Integer
|
452
|
+
|
453
|
+
def set_encoding: (?String | Encoding ext_or_ext_int_enc) -> self
|
454
|
+
| (?String | Encoding ext_or_ext_int_enc, ?String | Encoding int_enc) -> self
|
455
|
+
|
456
|
+
# Returns status information for *ios* as an object of type `File::Stat` .
|
457
|
+
#
|
458
|
+
# ```ruby
|
459
|
+
# f = File.new("testfile")
|
460
|
+
# s = f.stat
|
461
|
+
# "%o" % s.mode #=> "100644"
|
462
|
+
# s.blksize #=> 4096
|
463
|
+
# s.atime #=> Wed Apr 09 08:53:54 CDT 2003
|
464
|
+
# ```
|
465
|
+
def stat: () -> File::Stat
|
466
|
+
|
467
|
+
# Returns the current “sync mode” of *ios* . When sync mode is true, all
|
468
|
+
# output is immediately flushed to the underlying operating system and is
|
469
|
+
# not buffered by Ruby internally. See also `IO#fsync` .
|
470
|
+
#
|
471
|
+
# ```ruby
|
472
|
+
# f = File.new("testfile")
|
473
|
+
# f.sync #=> false
|
474
|
+
# ```
|
475
|
+
def sync: () -> bool
|
476
|
+
|
477
|
+
def sync=: (bool arg0) -> bool
|
478
|
+
|
479
|
+
def sysread: (Integer maxlen, String outbuf) -> String
|
480
|
+
|
481
|
+
def sysseek: (Integer amount, ?Integer whence) -> Integer
|
482
|
+
|
483
|
+
def syswrite: (String arg0) -> Integer
|
484
|
+
|
485
|
+
# Returns the current offset (in bytes) of *ios* .
|
486
|
+
#
|
487
|
+
# ```ruby
|
488
|
+
# f = File.new("testfile")
|
489
|
+
# f.pos #=> 0
|
490
|
+
# f.gets #=> "This is line one\n"
|
491
|
+
# f.pos #=> 17
|
492
|
+
# ```
|
493
|
+
def tell: () -> Integer
|
494
|
+
|
495
|
+
# Returns *ios* .
|
496
|
+
def to_io: () -> self
|
497
|
+
|
498
|
+
# Returns `true` if *ios* is associated with a terminal device (tty),
|
499
|
+
# `false` otherwise.
|
500
|
+
#
|
501
|
+
# ```ruby
|
502
|
+
# File.new("testfile").isatty #=> false
|
503
|
+
# File.new("/dev/tty").isatty #=> true
|
504
|
+
# ```
|
505
|
+
def tty?: () -> bool
|
506
|
+
|
507
|
+
def ungetbyte: (String | Integer arg0) -> NilClass
|
508
|
+
|
509
|
+
def ungetc: (String arg0) -> NilClass
|
510
|
+
|
511
|
+
def write: (String arg0) -> Integer
|
512
|
+
|
513
|
+
def self.binread: (String name, ?Integer length, ?Integer offset) -> String
|
514
|
+
|
515
|
+
def self.binwrite: (String name, String arg0, ?Integer offset, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> Integer
|
516
|
+
|
517
|
+
def self.copy_stream: (String | IO src, String | IO dst, ?Integer copy_length, ?Integer src_offset) -> Integer
|
518
|
+
|
519
|
+
def self.popen: (*untyped args) -> untyped
|
520
|
+
|
521
|
+
def self.read: (String name, ?Integer length, ?Integer offset, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> String
|
522
|
+
|
523
|
+
def self.readlines: (String name, ?String sep, ?Integer limit, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> ::Array[String]
|
524
|
+
|
525
|
+
def self.select: (::Array[IO]? read_array, ?::Array[IO]? write_array, ?::Array[IO]? error_array, ?Integer? timeout) -> ::Array[::Array[IO]]?
|
526
|
+
|
527
|
+
def self.sysopen: (String path, ?String mode, ?String perm) -> Integer
|
528
|
+
|
529
|
+
def self.try_convert: (untyped arg0) -> IO?
|
530
|
+
|
531
|
+
def self.write: (String name, String arg0, ?Integer offset, ?external_encoding: String external_encoding, ?internal_encoding: String internal_encoding, ?encoding: String encoding, ?textmode: untyped textmode, ?binmode: untyped binmode, ?autoclose: untyped autoclose, ?mode: String mode) -> Integer
|
532
|
+
|
533
|
+
def self.for_fd: (Integer fd, ?Integer mode, ?Integer opt) -> self
|
534
|
+
|
535
|
+
def bytes: () { (Integer arg0) -> untyped } -> self
|
536
|
+
| () -> ::Enumerator[Integer, self]
|
537
|
+
|
538
|
+
def chars: () { (String arg0) -> untyped } -> self
|
539
|
+
| () -> ::Enumerator[String, self]
|
540
|
+
|
541
|
+
def codepoints: () { (Integer arg0) -> untyped } -> self
|
542
|
+
| () -> ::Enumerator[Integer, self]
|
543
|
+
|
544
|
+
def each_line: (?String sep, ?Integer limit) { (String arg0) -> untyped } -> self
|
545
|
+
| (?String sep, ?Integer limit) -> ::Enumerator[String, self]
|
546
|
+
|
547
|
+
# Returns true if *ios* is at end of file that means there are no more
|
548
|
+
# data to read. The stream must be opened for reading or an `IOError` will
|
549
|
+
# be raised.
|
550
|
+
#
|
551
|
+
# ```ruby
|
552
|
+
# f = File.new("testfile")
|
553
|
+
# dummy = f.readlines
|
554
|
+
# f.eof #=> true
|
555
|
+
# ```
|
556
|
+
#
|
557
|
+
# If *ios* is a stream such as pipe or socket, `IO#eof?` blocks until the
|
558
|
+
# other end sends some data or closes it.
|
559
|
+
#
|
560
|
+
# ```ruby
|
561
|
+
# r, w = IO.pipe
|
562
|
+
# Thread.new { sleep 1; w.close }
|
563
|
+
# r.eof? #=> true after 1 second blocking
|
564
|
+
#
|
565
|
+
# r, w = IO.pipe
|
566
|
+
# Thread.new { sleep 1; w.puts "a" }
|
567
|
+
# r.eof? #=> false after 1 second blocking
|
568
|
+
#
|
569
|
+
# r, w = IO.pipe
|
570
|
+
# r.eof? # blocks forever
|
571
|
+
# ```
|
572
|
+
#
|
573
|
+
# Note that `IO#eof?` reads data to the input byte buffer. So `IO#sysread`
|
574
|
+
# may not behave as you intend with `IO#eof?`, unless you call
|
575
|
+
# `IO#rewind` first (which is not available for some streams).
|
576
|
+
def eof?: () -> bool
|
577
|
+
|
578
|
+
def lines: (?String sep, ?Integer limit) { (String arg0) -> untyped } -> self
|
579
|
+
| (?String sep, ?Integer limit) -> ::Enumerator[String, self]
|
580
|
+
|
581
|
+
# Alias for: [fileno](IO.downloaded.ruby_doc#method-i-fileno)
|
582
|
+
def to_i: () -> Integer
|
583
|
+
end
|
584
|
+
|
585
|
+
IO::APPEND: Integer
|
586
|
+
|
587
|
+
IO::BINARY: Integer
|
588
|
+
|
589
|
+
IO::CREAT: Integer
|
590
|
+
|
591
|
+
IO::DIRECT: Integer
|
592
|
+
|
593
|
+
IO::DSYNC: Integer
|
594
|
+
|
595
|
+
IO::EXCL: Integer
|
596
|
+
|
597
|
+
IO::FNM_CASEFOLD: Integer
|
598
|
+
|
599
|
+
IO::FNM_DOTMATCH: Integer
|
600
|
+
|
601
|
+
IO::FNM_EXTGLOB: Integer
|
602
|
+
|
603
|
+
IO::FNM_NOESCAPE: Integer
|
604
|
+
|
605
|
+
IO::FNM_PATHNAME: Integer
|
606
|
+
|
607
|
+
IO::FNM_SHORTNAME: Integer
|
608
|
+
|
609
|
+
IO::FNM_SYSCASE: Integer
|
610
|
+
|
611
|
+
IO::LOCK_EX: Integer
|
612
|
+
|
613
|
+
IO::LOCK_NB: Integer
|
614
|
+
|
615
|
+
IO::LOCK_SH: Integer
|
616
|
+
|
617
|
+
IO::LOCK_UN: Integer
|
618
|
+
|
619
|
+
IO::NOATIME: Integer
|
620
|
+
|
621
|
+
IO::NOCTTY: Integer
|
622
|
+
|
623
|
+
IO::NOFOLLOW: Integer
|
624
|
+
|
625
|
+
IO::NONBLOCK: Integer
|
626
|
+
|
627
|
+
IO::NULL: String
|
628
|
+
|
629
|
+
IO::RDONLY: Integer
|
630
|
+
|
631
|
+
IO::RDWR: Integer
|
632
|
+
|
633
|
+
IO::RSYNC: Integer
|
634
|
+
|
635
|
+
IO::SEEK_CUR: Integer
|
636
|
+
|
637
|
+
IO::SEEK_DATA: Integer
|
638
|
+
|
639
|
+
IO::SEEK_END: Integer
|
640
|
+
|
641
|
+
IO::SEEK_HOLE: Integer
|
642
|
+
|
643
|
+
IO::SEEK_SET: Integer
|
644
|
+
|
645
|
+
IO::SHARE_DELETE: Integer
|
646
|
+
|
647
|
+
IO::SYNC: Integer
|
648
|
+
|
649
|
+
IO::TMPFILE: Integer
|
650
|
+
|
651
|
+
IO::TRUNC: Integer
|
652
|
+
|
653
|
+
IO::WRONLY: Integer
|
654
|
+
|
655
|
+
class IO::EAGAINWaitReadable < Errno::EAGAIN
|
656
|
+
include IO::WaitReadable
|
657
|
+
end
|
658
|
+
|
659
|
+
IO::EAGAINWaitReadable::Errno: Integer
|
660
|
+
|
661
|
+
class IO::EAGAINWaitWritable < Errno::EAGAIN
|
662
|
+
include IO::WaitWritable
|
663
|
+
end
|
664
|
+
|
665
|
+
IO::EAGAINWaitWritable::Errno: Integer
|
666
|
+
|
667
|
+
class IO::EINPROGRESSWaitReadable < Errno::EINPROGRESS
|
668
|
+
include IO::WaitReadable
|
669
|
+
end
|
670
|
+
|
671
|
+
IO::EINPROGRESSWaitReadable::Errno: Integer
|
672
|
+
|
673
|
+
class IO::EINPROGRESSWaitWritable < Errno::EINPROGRESS
|
674
|
+
include IO::WaitWritable
|
675
|
+
end
|
676
|
+
|
677
|
+
IO::EINPROGRESSWaitWritable::Errno: Integer
|
678
|
+
|
679
|
+
module IO::WaitReadable
|
680
|
+
end
|
681
|
+
|
682
|
+
module IO::WaitWritable
|
683
|
+
end
|