rbs 1.3.3 → 1.6.0
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/.github/dependabot.yml +10 -0
- data/CHANGELOG.md +69 -0
- data/Gemfile +2 -0
- data/Rakefile +4 -0
- data/Steepfile +9 -1
- data/core/array.rbs +8 -7
- data/core/builtin.rbs +1 -1
- data/core/enumerable.rbs +11 -10
- data/core/enumerator.rbs +2 -2
- data/core/exception.rbs +1 -0
- data/core/false_class.rbs +4 -4
- data/core/file.rbs +3 -1
- data/core/float.rbs +1 -1
- data/core/global_variables.rbs +180 -0
- data/core/hash.rbs +7 -7
- data/core/integer.rbs +1 -2
- data/core/io/wait.rbs +37 -0
- data/core/io.rbs +11 -5
- data/core/kernel.rbs +25 -2
- data/core/object.rbs +1 -1
- data/core/ractor.rbs +779 -0
- data/core/range.rbs +11 -9
- data/core/string_io.rbs +3 -5
- data/core/true_class.rbs +4 -4
- data/docs/collection.md +116 -0
- data/lib/rbs/builtin_names.rb +1 -0
- data/lib/rbs/cli.rb +94 -2
- data/lib/rbs/collection/cleaner.rb +29 -0
- data/lib/rbs/collection/config/lockfile_generator.rb +95 -0
- data/lib/rbs/collection/config.rb +85 -0
- data/lib/rbs/collection/installer.rb +27 -0
- data/lib/rbs/collection/sources/git.rb +147 -0
- data/lib/rbs/collection/sources/rubygems.rb +40 -0
- data/lib/rbs/collection/sources/stdlib.rb +38 -0
- data/lib/rbs/collection/sources.rb +22 -0
- data/lib/rbs/collection.rb +13 -0
- data/lib/rbs/environment_loader.rb +12 -0
- data/lib/rbs/errors.rb +18 -0
- data/lib/rbs/parser.rb +1 -1
- data/lib/rbs/parser.y +1 -1
- data/lib/rbs/prototype/rb.rb +8 -1
- data/lib/rbs/prototype/runtime.rb +1 -1
- data/lib/rbs/repository.rb +13 -7
- data/lib/rbs/type_alias_dependency.rb +88 -0
- data/lib/rbs/validator.rb +8 -0
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs.rb +2 -0
- data/sig/builtin_names.rbs +1 -0
- data/sig/cli.rbs +5 -0
- data/sig/collection/cleaner.rbs +13 -0
- data/sig/collection/collections.rbs +112 -0
- data/sig/collection/config.rbs +69 -0
- data/sig/collection/installer.rbs +15 -0
- data/sig/collection.rbs +4 -0
- data/sig/environment_loader.rbs +3 -0
- data/sig/errors.rbs +9 -0
- data/sig/polyfill.rbs +12 -3
- data/sig/repository.rbs +4 -0
- data/sig/type_alias_dependency.rbs +22 -0
- data/sig/validator.rbs +2 -0
- data/stdlib/digest/0/digest.rbs +418 -0
- data/stdlib/objspace/0/objspace.rbs +406 -0
- data/stdlib/openssl/0/openssl.rbs +3711 -0
- data/stdlib/pathname/0/pathname.rbs +2 -2
- data/stdlib/rubygems/0/rubygems.rbs +1 -1
- data/stdlib/securerandom/0/securerandom.rbs +3 -1
- data/stdlib/tempfile/0/tempfile.rbs +270 -0
- data/stdlib/uri/0/generic.rbs +3 -3
- data/steep/Gemfile.lock +10 -10
- metadata +28 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7050ff50eb28c830dd0b36c6f36a5d1913342daf67096313b2abf6d5285dbe
|
4
|
+
data.tar.gz: 4ee896f45c1857cea2f15a6cc69fd976c15055a36bb77cec51c669dfb56cc79e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aa3aa5be6922a746a36012cb3c5ba624a44d0ed5dac05790942ebf44bb7f4f44a107209465a69143282b33e9a18b7b4f820d093b6228f0a091c0fb190268e32
|
7
|
+
data.tar.gz: fa46604d3d6b154555084d4d77861dbc8eae77d54f88486cf6df691da4b605576569f7d55acac1deeb3b30202ea561c9cf221ac44c8aab6acbe0cd483f7d786d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,75 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.6.0 (2021-09-05)
|
6
|
+
|
7
|
+
This release includes a preview of `rbs collection` commands, which is _bundler for RBS_.
|
8
|
+
The command helps you manage RBS files from gem_rbs_collection or other repositories.
|
9
|
+
|
10
|
+
This feature is a preview, and any feedback is welcome!
|
11
|
+
|
12
|
+
## Signature updates
|
13
|
+
|
14
|
+
* objspace ([\#763](https://github.com/ruby/rbs/pull/763), [\#776](https://github.com/ruby/rbs/pull/776))
|
15
|
+
* tempfile ([\#767](https://github.com/ruby/rbs/pull/767), [\#775](https://github.com/ruby/rbs/pull/775))
|
16
|
+
* `IO#set_encoding_by_bom` ([\#106](https://github.com/ruby/rbs/pull/106))
|
17
|
+
* `OpenSSL::PKey::EC#dh_compute_key` ([\#775](https://github.com/ruby/rbs/pull/775))
|
18
|
+
|
19
|
+
## Library changes
|
20
|
+
|
21
|
+
* Add `rbs collection` ([\#589](https://github.com/ruby/rbs/pull/589), [\#772](https://github.com/ruby/rbs/pull/772), [\#773](https://github.com/ruby/rbs/pull/773))
|
22
|
+
|
23
|
+
## Miscellaneous
|
24
|
+
|
25
|
+
* Let `bin/annotate-with-rdoc` process nested constants/classes ([\#766](https://github.com/ruby/rbs/pull/766), [\#768](https://github.com/ruby/rbs/pull/768))
|
26
|
+
* Stop printing version mismatch message in CI ([\#777](https://github.com/ruby/rbs/pull/777))
|
27
|
+
* Update Steep and fix type errors ([\#770](https://github.com/ruby/rbs/pull/770), [\#774](https://github.com/ruby/rbs/pull/774))
|
28
|
+
* Add dependabot configuration ([\#771](https://github.com/ruby/rbs/pull/771))
|
29
|
+
|
30
|
+
## 1.5.1 (2021-08-22)
|
31
|
+
|
32
|
+
### Miscellaneous
|
33
|
+
|
34
|
+
* Fix Net_HTTP_test ([\#759](https://github.com/ruby/rbs/pull/759))
|
35
|
+
|
36
|
+
## 1.5.0 (2021-08-22)
|
37
|
+
|
38
|
+
This release includes stdlib signature updates.
|
39
|
+
|
40
|
+
### Signature updates
|
41
|
+
|
42
|
+
* digest ([\#744](https://github.com/ruby/rbs/pull/744), [\#757](https://github.com/ruby/rbs/pull/757))
|
43
|
+
* io-wait ([\#756](https://github.com/ruby/rbs/pull/756), [\#758](https://github.com/ruby/rbs/pull/758))
|
44
|
+
* `Ractor` ([\#755](https://github.com/ruby/rbs/pull/755))
|
45
|
+
* `File::Stat#size?` ([\#754](https://github.com/ruby/rbs/pull/754))
|
46
|
+
* `$-i`, `$0`, `$PROGRAM_NAME` ([\#753](https://github.com/ruby/rbs/pull/753))
|
47
|
+
|
48
|
+
## 1.4.0 (2021-08-19)
|
49
|
+
|
50
|
+
This release includes feature enhancements including recursive `type` definition validation, improved compatibility of global variable names, and various method type updates.
|
51
|
+
|
52
|
+
### Signature updates
|
53
|
+
|
54
|
+
* openssl ([\#743](https://github.com/ruby/rbs/pull/743))
|
55
|
+
* `Array`, `Enumerator`, `Enumerable`, `Hash`, `FalseClass`, `Float`, `Hash`, `Integer`, `Object`, `Range`, `TrueClass` ([\#728](https://github.com/ruby/rbs/pull/728))
|
56
|
+
* `Array#[]` ([\#732](https://github.com/ruby/rbs/pull/732))
|
57
|
+
* `Exception#set_backtrace` ([\#738](https://github.com/ruby/rbs/pull/738))
|
58
|
+
* `Kernel#Array` ([\#733](https://github.com/ruby/rbs/pull/733))
|
59
|
+
* `Kernel#spawn` ([\#748](https://github.com/ruby/rbs/pull/748))
|
60
|
+
* `Kernel#String` ([\#745](https://github.com/ruby/rbs/pull/745), [\#751](https://github.com/ruby/rbs/pull/751))
|
61
|
+
* `URI::Generic#fragment` ([\#752](https://github.com/ruby/rbs/pull/752))
|
62
|
+
* `URI::Generic#merge` ([\#746](https://github.com/ruby/rbs/pull/746))
|
63
|
+
|
64
|
+
### Language updates
|
65
|
+
|
66
|
+
* Add global variables signature ([\#749](https://github.com/ruby/rbs/pull/749))
|
67
|
+
|
68
|
+
### Library changes
|
69
|
+
|
70
|
+
* Add Recursiive type alias defnition validation ([\#719](https://github.com/ruby/rbs/pull/719))
|
71
|
+
* Generate included modules with complete name ([\#731](https://github.com/ruby/rbs/pull/731))
|
72
|
+
* Fix `rbs-prototype-rb` error when multi assign with const ([\#740](https://github.com/ruby/rbs/pull/740))
|
73
|
+
|
5
74
|
## 1.3.3 (2021-07-28)
|
6
75
|
|
7
76
|
This release includes a minor update of `resolv` library RBS and a fix of test for `ruby/ruby` CI.
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/Steepfile
CHANGED
@@ -1,13 +1,21 @@
|
|
1
|
+
D = Steep::Diagnostic
|
2
|
+
|
1
3
|
target :lib do
|
2
4
|
signature "sig"
|
3
5
|
check "lib"
|
4
6
|
ignore "lib/rbs/parser.rb"
|
5
7
|
ignore "lib/rbs/prototype", "lib/rbs/test", "lib/rbs/test.rb"
|
6
8
|
|
7
|
-
library "set", "pathname", "json", "logger", "monitor", "tsort"
|
9
|
+
library "set", "pathname", "json", "logger", "monitor", "tsort", "uri"
|
8
10
|
signature "stdlib/strscan/0/"
|
9
11
|
signature "stdlib/rubygems/0/"
|
10
12
|
signature "stdlib/optparse/0/"
|
13
|
+
|
14
|
+
configure_code_diagnostics do |config|
|
15
|
+
config[D::Ruby::MethodDefinitionMissing] = :hint
|
16
|
+
config[D::Ruby::ElseOnExhaustiveCase] = :hint
|
17
|
+
config[D::Ruby::FallbackAny] = :hint
|
18
|
+
end
|
11
19
|
end
|
12
20
|
|
13
21
|
# target :lib do
|
data/core/array.rbs
CHANGED
@@ -452,7 +452,7 @@ class Array[unchecked out Elem] < Object
|
|
452
452
|
#
|
453
453
|
def []: (int index) -> Elem
|
454
454
|
| (int start, int length) -> ::Array[Elem]?
|
455
|
-
| (::Range[::Integer] range) -> ::Array[Elem]?
|
455
|
+
| (::Range[::Integer?] range) -> ::Array[Elem]?
|
456
456
|
|
457
457
|
# Element Assignment --- Sets the element at `index`, or replaces a subarray
|
458
458
|
# from the `start` index for `length` elements, or replaces a subarray specified
|
@@ -486,9 +486,9 @@ class Array[unchecked out Elem] < Object
|
|
486
486
|
| (int start, int length, Elem obj) -> Elem
|
487
487
|
| (int start, int length, ::Array[Elem]) -> ::Array[Elem]
|
488
488
|
| (int start, int length, nil) -> nil
|
489
|
-
| (::Range[::Integer], Elem obj) -> Elem
|
490
|
-
| (::Range[::Integer], ::Array[Elem]) -> ::Array[Elem]
|
491
|
-
| (::Range[::Integer], nil) -> nil
|
489
|
+
| (::Range[::Integer?], Elem obj) -> Elem
|
490
|
+
| (::Range[::Integer?], ::Array[Elem]) -> ::Array[Elem]
|
491
|
+
| (::Range[::Integer?], nil) -> nil
|
492
492
|
|
493
493
|
# See also Enumerable#all?
|
494
494
|
#
|
@@ -576,7 +576,8 @@ class Array[unchecked out Elem] < Object
|
|
576
576
|
# true/false, or always return a number. It is undefined which value is
|
577
577
|
# actually picked up at each iteration.
|
578
578
|
#
|
579
|
-
def bsearch: ()
|
579
|
+
def bsearch: () -> ::Enumerator[Elem, Elem?]
|
580
|
+
| () { (Elem) -> (true | false) } -> Elem?
|
580
581
|
| () { (Elem) -> ::Integer } -> Elem?
|
581
582
|
|
582
583
|
# By using binary search, finds an index of a value from this array which meets
|
@@ -855,7 +856,7 @@ class Array[unchecked out Elem] < Object
|
|
855
856
|
# 0 -- 1 -- 2 --
|
856
857
|
#
|
857
858
|
def each_index: () { (::Integer index) -> void } -> self
|
858
|
-
| () -> ::Enumerator[
|
859
|
+
| () -> ::Enumerator[::Integer, self]
|
859
860
|
|
860
861
|
# Returns `true` if `self` contains no elements.
|
861
862
|
#
|
@@ -1585,7 +1586,7 @@ class Array[unchecked out Elem] < Object
|
|
1585
1586
|
# a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2]
|
1586
1587
|
#
|
1587
1588
|
def sample: (?random: _Rand rng) -> Elem?
|
1588
|
-
| (
|
1589
|
+
| (int n, ?random: _Rand rng) -> ::Array[Elem]
|
1589
1590
|
|
1590
1591
|
# Returns a new array containing all elements of `ary` for which the given
|
1591
1592
|
# `block` returns a true value.
|
data/core/builtin.rbs
CHANGED
data/core/enumerable.rbs
CHANGED
@@ -48,7 +48,8 @@ module Enumerable[unchecked out Elem]: _Each[Elem]
|
|
48
48
|
def collect: [U] () { (Elem arg0) -> U } -> ::Array[U]
|
49
49
|
| () -> ::Enumerator[Elem, ::Array[untyped]]
|
50
50
|
|
51
|
-
def collect_concat: [U] () { (Elem
|
51
|
+
def collect_concat: [U] () { (Elem) -> (::Array[U] | U) } -> ::Array[U]
|
52
|
+
| () -> ::Enumerator[Elem, ::Array[untyped]]
|
52
53
|
|
53
54
|
# Returns the number of items in `enum` through enumeration. If an
|
54
55
|
# argument is given, the number of items in `enum` that are equal to
|
@@ -79,11 +80,11 @@ module Enumerable[unchecked out Elem]: _Each[Elem]
|
|
79
80
|
def each_cons: (Integer n) { (::Array[Elem] arg0) -> untyped } -> NilClass
|
80
81
|
| (Integer n) -> ::Enumerator[::Array[Elem], NilClass]
|
81
82
|
|
82
|
-
def each_with_index: () { (Elem
|
83
|
-
| () -> ::Enumerator[[ Elem, Integer ],
|
83
|
+
def each_with_index: () { (Elem, Integer index) -> untyped } -> self
|
84
|
+
| () -> ::Enumerator[[ Elem, Integer ], self]
|
84
85
|
|
85
|
-
def each_with_object: [U] (U
|
86
|
-
| [U] (U
|
86
|
+
def each_with_object: [U] (U obj) { (Elem, U obj) -> untyped } -> U
|
87
|
+
| [U] (U obj) -> ::Enumerator[[ Elem, U ], U]
|
87
88
|
|
88
89
|
# Returns an array containing the items in *enum* .
|
89
90
|
#
|
@@ -102,7 +103,7 @@ module Enumerable[unchecked out Elem]: _Each[Elem]
|
|
102
103
|
alias select find_all
|
103
104
|
alias filter find_all
|
104
105
|
|
105
|
-
def find_index: (
|
106
|
+
def find_index: (untyped value) -> Integer?
|
106
107
|
| () { (Elem) -> boolish } -> Integer?
|
107
108
|
| () -> ::Enumerator[Elem, Integer?]
|
108
109
|
|
@@ -123,8 +124,8 @@ module Enumerable[unchecked out Elem]: _Each[Elem]
|
|
123
124
|
def grep: (untyped arg0) -> ::Array[Elem]
|
124
125
|
| [U] (untyped arg0) { (Elem arg0) -> U } -> ::Array[U]
|
125
126
|
|
126
|
-
def grep_v: (untyped
|
127
|
-
| [U] (untyped
|
127
|
+
def grep_v: (untyped) -> ::Array[Elem]
|
128
|
+
| [U] (untyped) { (Elem) -> U } -> ::Array[U]
|
128
129
|
|
129
130
|
def group_by: [U] () { (Elem arg0) -> U } -> ::Hash[U, ::Array[Elem]]
|
130
131
|
| () -> ::Enumerator[Elem, ::Array[Elem]]
|
@@ -410,8 +411,8 @@ module Enumerable[unchecked out Elem]: _Each[Elem]
|
|
410
411
|
def zip: [Elem2] (::Enumerable[Elem2] enum) -> ::Array[[Elem, Elem2 | nil]]
|
411
412
|
| [U, Elem2] (::Enumerable[Elem2]) { ([Elem, Elem2 | nil]) -> U } -> nil
|
412
413
|
|
413
|
-
def chunk: [U] () { (Elem elt) -> U } -> ::Enumerator[[U, Array[Elem]], void]
|
414
|
-
| () -> ::Enumerator[Elem, Enumerator[untyped,
|
414
|
+
def chunk: [U] () { (Elem elt) -> U } -> ::Enumerator[[U, ::Array[Elem]], void]
|
415
|
+
| () -> ::Enumerator[Elem, ::Enumerator[[untyped, ::Array[Elem]], void]]
|
415
416
|
|
416
417
|
def chunk_while: () { (Elem elt_before, Elem elt_after) -> boolish } -> ::Enumerator[::Array[Elem], void]
|
417
418
|
|
data/core/enumerator.rbs
CHANGED
@@ -238,8 +238,8 @@ class Enumerator[unchecked out Elem, out Return] < Object
|
|
238
238
|
def with_index: (?Integer offset) { (Elem arg0, Integer arg1) -> untyped } -> Return
|
239
239
|
| (?Integer offset) -> ::Enumerator[[ Elem, Integer ], Return]
|
240
240
|
|
241
|
-
def with_object: [U] (U
|
242
|
-
| [U] (U
|
241
|
+
def with_object: [U] (U obj) { (Elem, U obj) -> untyped } -> U
|
242
|
+
| [U] (U obj) -> ::Enumerator[[ Elem, U ], U]
|
243
243
|
end
|
244
244
|
|
245
245
|
class Enumerator::Generator[out Elem] < Object
|
data/core/exception.rbs
CHANGED
data/core/false_class.rbs
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
class FalseClass
|
6
6
|
public
|
7
7
|
|
8
|
-
def !: () ->
|
8
|
+
def !: () -> true
|
9
9
|
|
10
10
|
# And---Returns `false`. *obj* is always evaluated as it is the argument to a
|
11
11
|
# method call---there is no short-circuit evaluation in this case.
|
12
12
|
#
|
13
|
-
def &: (untyped obj) ->
|
13
|
+
def &: (untyped obj) -> false
|
14
14
|
|
15
15
|
# Case Equality -- For class Object, effectively the same as calling `#==`, but
|
16
16
|
# typically overridden by descendants to provide meaningful semantics in `case`
|
@@ -24,7 +24,7 @@ class FalseClass
|
|
24
24
|
#
|
25
25
|
def ^: (nil) -> false
|
26
26
|
| (false) -> false
|
27
|
-
| (untyped obj) ->
|
27
|
+
| (untyped obj) -> true
|
28
28
|
|
29
29
|
alias inspect to_s
|
30
30
|
|
@@ -36,5 +36,5 @@ class FalseClass
|
|
36
36
|
#
|
37
37
|
def |: (nil) -> false
|
38
38
|
| (false) -> false
|
39
|
-
| (untyped obj) ->
|
39
|
+
| (untyped obj) -> true
|
40
40
|
end
|
data/core/file.rbs
CHANGED
@@ -1042,7 +1042,7 @@ class File::Stat < Object
|
|
1042
1042
|
|
1043
1043
|
def rdev_minor: () -> Integer
|
1044
1044
|
|
1045
|
-
def read: (?
|
1045
|
+
def read: (?int? length, ?string outbuf) -> String?
|
1046
1046
|
|
1047
1047
|
def readable?: () -> bool
|
1048
1048
|
|
@@ -1054,6 +1054,8 @@ class File::Stat < Object
|
|
1054
1054
|
|
1055
1055
|
def size: () -> Integer
|
1056
1056
|
|
1057
|
+
def size?: () -> Integer?
|
1058
|
+
|
1057
1059
|
def socket?: () -> bool
|
1058
1060
|
|
1059
1061
|
def sticky?: () -> bool
|
data/core/float.rbs
CHANGED
@@ -0,0 +1,180 @@
|
|
1
|
+
# The Exception object set by Kernel#raise.
|
2
|
+
$!: Exception | nil
|
3
|
+
|
4
|
+
# The array contains the module names loaded by require.
|
5
|
+
$": Array[String]
|
6
|
+
|
7
|
+
# The process number of the Ruby running this script. Same as Process.pid.
|
8
|
+
$$: Integer
|
9
|
+
|
10
|
+
# The string matched by the last successful match.
|
11
|
+
$&: String | nil
|
12
|
+
|
13
|
+
# The string to the right of the last successful match.
|
14
|
+
$': String | nil
|
15
|
+
|
16
|
+
# The same as ARGV.
|
17
|
+
$*: Array[String]
|
18
|
+
|
19
|
+
# The highest group matched by the last successful match.
|
20
|
+
$+: String | nil
|
21
|
+
|
22
|
+
# The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.
|
23
|
+
$,: String | nil
|
24
|
+
|
25
|
+
# The input record separator, newline by default.
|
26
|
+
$-0: String | nil
|
27
|
+
|
28
|
+
# The default separator for String#split. Non-nil $; will be deprecated.
|
29
|
+
$-F: Regexp | String | nil
|
30
|
+
|
31
|
+
# Load path for searching Ruby scripts and extension libraries used
|
32
|
+
# by Kernel#load and Kernel#require.
|
33
|
+
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
|
34
|
+
# that returns [+:rb+ or +:so+, path], which resolves the feature to
|
35
|
+
# the path the original Kernel#require method would load.
|
36
|
+
$-I: Array[String]
|
37
|
+
|
38
|
+
$-W: 0 | 1 | 2
|
39
|
+
|
40
|
+
# True if option <tt>-a</tt> is set. Read-only variable.
|
41
|
+
$-a: bool
|
42
|
+
|
43
|
+
# The debug flag, which is set by the <tt>-d</tt> switch. Enabling debug
|
44
|
+
# output prints each exception raised to $stderr (but not its
|
45
|
+
# backtrace). Setting this to a true value enables debug output as
|
46
|
+
# if <tt>-d</tt> were given on the command line. Setting this to a false
|
47
|
+
# value disables debug output.
|
48
|
+
$-d: bool
|
49
|
+
|
50
|
+
# In in-place-edit mode, this variable holds the extension, otherwise +nil+.
|
51
|
+
$-i: String?
|
52
|
+
|
53
|
+
# True if option <tt>-l</tt> is set. Read-only variable.
|
54
|
+
$-l: bool
|
55
|
+
|
56
|
+
# True if option <tt>-p</tt> is set. Read-only variable.
|
57
|
+
$-p: bool
|
58
|
+
|
59
|
+
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
|
60
|
+
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
61
|
+
# on the command line. Setting this to +nil+ disables warnings,
|
62
|
+
# including from Kernel#warn.
|
63
|
+
$-v: bool | nil
|
64
|
+
|
65
|
+
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
|
66
|
+
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
67
|
+
# on the command line. Setting this to +nil+ disables warnings,
|
68
|
+
# including from Kernel#warn.
|
69
|
+
$-w: bool | nil
|
70
|
+
|
71
|
+
# The current input line number of the last file that was read.
|
72
|
+
$.: Integer
|
73
|
+
|
74
|
+
# The input record separator, newline by default. Aliased to $-0.
|
75
|
+
$/: String | nil
|
76
|
+
|
77
|
+
# Contains the name of the script being executed. May be assignable.
|
78
|
+
$0: String
|
79
|
+
|
80
|
+
# The Nth group of the last successful match. May be > 1.
|
81
|
+
$1: String | nil
|
82
|
+
|
83
|
+
# The Nth group of the last successful match. May be > 1.
|
84
|
+
$2: String | nil
|
85
|
+
|
86
|
+
# The Nth group of the last successful match. May be > 1.
|
87
|
+
$3: String | nil
|
88
|
+
|
89
|
+
# The Nth group of the last successful match. May be > 1.
|
90
|
+
$4: String | nil
|
91
|
+
|
92
|
+
# The Nth group of the last successful match. May be > 1.
|
93
|
+
$5: String | nil
|
94
|
+
|
95
|
+
# The Nth group of the last successful match. May be > 1.
|
96
|
+
$6: String | nil
|
97
|
+
|
98
|
+
# The Nth group of the last successful match. May be > 1.
|
99
|
+
$7: String | nil
|
100
|
+
|
101
|
+
# The Nth group of the last successful match. May be > 1.
|
102
|
+
$8: String | nil
|
103
|
+
|
104
|
+
# The Nth group of the last successful match. May be > 1.
|
105
|
+
$9: String | nil
|
106
|
+
|
107
|
+
# Load path for searching Ruby scripts and extension libraries used
|
108
|
+
# by Kernel#load and Kernel#require.
|
109
|
+
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
|
110
|
+
# that returns [+:rb+ or +:so+, path], which resolves the feature to
|
111
|
+
# the path the original Kernel#require method would load.
|
112
|
+
$:: Array[String]
|
113
|
+
|
114
|
+
# The default separator for String#split. Non-nil $; will be deprecated. Aliased to $-F.
|
115
|
+
$;: Regexp | String | nil
|
116
|
+
|
117
|
+
# The same as ARGF.
|
118
|
+
$<: IO
|
119
|
+
|
120
|
+
# This variable is no longer effective. Deprecated.
|
121
|
+
$=: bool
|
122
|
+
|
123
|
+
# The default output stream for Kernel#print and Kernel#printf. $stdout by default.
|
124
|
+
$>: IO
|
125
|
+
|
126
|
+
# The status of the last executed child process (thread-local).
|
127
|
+
$?: Process::Status | nil
|
128
|
+
|
129
|
+
# The same as <code>$!.backtrace</code>.
|
130
|
+
$@: Array[String] | nil
|
131
|
+
|
132
|
+
# The debug flag, which is set by the <tt>-d</tt> switch. Enabling debug
|
133
|
+
# output prints each exception raised to $stderr (but not its
|
134
|
+
# backtrace). Setting this to a true value enables debug output as
|
135
|
+
# if <tt>-d</tt> were given on the command line. Setting this to a false
|
136
|
+
# value disables debug output. Aliased to $-d.
|
137
|
+
$DEBUG: bool
|
138
|
+
|
139
|
+
# Current input filename from ARGF. Same as ARGF.filename.
|
140
|
+
$FILENAME: String
|
141
|
+
|
142
|
+
# The array contains the module names loaded by require.
|
143
|
+
$LOADED_FEATURES: Array[String]
|
144
|
+
|
145
|
+
# Load path for searching Ruby scripts and extension libraries used
|
146
|
+
# by Kernel#load and Kernel#require. Aliased to $: and $-I.
|
147
|
+
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
|
148
|
+
# that returns [+:rb+ or +:so+, path], which resolves the feature to
|
149
|
+
# the path the original Kernel#require method would load.
|
150
|
+
$LOAD_PATH: Array[String]
|
151
|
+
|
152
|
+
# Contains the name of the script being executed. May be assignable.
|
153
|
+
$PROGRAM_NAME: String
|
154
|
+
|
155
|
+
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
|
156
|
+
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
157
|
+
# on the command line. Setting this to +nil+ disables warnings,
|
158
|
+
# including from Kernel#warn. Aliased to $-v and $-w.
|
159
|
+
$VERBOSE: bool | nil
|
160
|
+
|
161
|
+
# The output record separator for Kernel#print and IO#write. Default is +nil+.
|
162
|
+
$\: String | nil
|
163
|
+
|
164
|
+
# The last input line of string by gets or readline.
|
165
|
+
$_: String | nil
|
166
|
+
|
167
|
+
# The string to the left of the last successful match.
|
168
|
+
$`: String | nil
|
169
|
+
|
170
|
+
# The current standard error output.
|
171
|
+
$stderr: IO
|
172
|
+
|
173
|
+
# The current standard input.
|
174
|
+
$stdin: IO
|
175
|
+
|
176
|
+
# The current standard output.
|
177
|
+
$stdout: IO
|
178
|
+
|
179
|
+
# The information about the last match in the current scope (thread-local and frame-local).
|
180
|
+
$~: MatchData | nil
|