-
Notifications
You must be signed in to change notification settings - Fork 217
/
global_variables.rbs
184 lines (133 loc) · 5.64 KB
/
global_variables.rbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# The Exception object set by Kernel#raise.
$!: Exception?
# The array contains the module names loaded by require.
$": Array[String]
# The process number of the Ruby running this script. Same as Process.pid.
$$: Integer
# The string matched by the last successful match.
$&: String?
# The string to the right of the last successful match.
$': String?
# The same as ARGV.
$*: Array[String]
# The highest group matched by the last successful match.
$+: String?
# The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.
$,: String?
# The input record separator, newline by default.
$-0: String?
# The default separator for String#split. Non-nil $; will be deprecated.
$-F: Regexp | String | nil
# Load path for searching Ruby scripts and extension libraries used
# by Kernel#load and Kernel#require.
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
# that returns [+:rb+ or +:so+, path], which resolves the feature to
# the path the original Kernel#require method would load.
$-I: Array[String]
$-W: 0 | 1 | 2
# True if option <tt>-a</tt> is set. Read-only variable.
$-a: bool
# The debug flag, which is set by the <tt>-d</tt> switch. Enabling debug
# output prints each exception raised to $stderr (but not its
# backtrace). Setting this to a true value enables debug output as
# if <tt>-d</tt> were given on the command line. Setting this to a false
# value disables debug output.
$-d: boolish
# In in-place-edit mode, this variable holds the extension, otherwise +nil+.
$-i: String?
# True if option <tt>-l</tt> is set. Read-only variable.
$-l: bool
# True if option <tt>-p</tt> is set. Read-only variable.
$-p: bool
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
# on the command line. Setting this to +nil+ disables warnings,
# including from Kernel#warn.
$-v: bool?
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
# on the command line. Setting this to +nil+ disables warnings,
# including from Kernel#warn.
$-w: bool?
# The current input line number of the last file that was read.
$.: Integer
# The input record separator, newline by default. Aliased to $-0.
$/: String?
# Contains the name of the script being executed. May be assignable.
$0: String
# The Nth group of the last successful match. May be > 1.
$1: String?
# The Nth group of the last successful match. May be > 1.
$2: String?
# The Nth group of the last successful match. May be > 1.
$3: String?
# The Nth group of the last successful match. May be > 1.
$4: String?
# The Nth group of the last successful match. May be > 1.
$5: String?
# The Nth group of the last successful match. May be > 1.
$6: String?
# The Nth group of the last successful match. May be > 1.
$7: String?
# The Nth group of the last successful match. May be > 1.
$8: String?
# The Nth group of the last successful match. May be > 1.
$9: String?
# Load path for searching Ruby scripts and extension libraries used
# by Kernel#load and Kernel#require.
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
# that returns [+:rb+ or +:so+, path], which resolves the feature to
# the path the original Kernel#require method would load.
$:: Array[String]
# The default separator for String#split. Non-nil $; will be deprecated. Aliased to $-F.
$;: Regexp | String | nil
# The same as ARGF.
$<: RBS::Unnamed::ARGFClass
# This variable is no longer effective. Deprecated.
$=: false
# The default output stream for Kernel#print and Kernel#printf. $stdout by default.
$>: IO
# The status of the last executed child process (thread-local).
$?: Process::Status?
# The same as <code>$!.backtrace</code>.
$@: Array[String]?
# The debug flag, which is set by the <tt>-d</tt> switch. Enabling debug
# output prints each exception raised to $stderr (but not its
# backtrace). Setting this to a true value enables debug output as
# if <tt>-d</tt> were given on the command line. Setting this to a false
# value disables debug output. Aliased to $-d.
$DEBUG: boolish
# Current input filename from ARGF. Same as ARGF.filename.
$FILENAME: String
# The array contains the module names loaded by require.
$LOADED_FEATURES: Array[String]
# Load path for searching Ruby scripts and extension libraries used
# by Kernel#load and Kernel#require. Aliased to $: and $-I.
# Has a singleton method <code>$LOAD_PATH.resolve_feature_path(feature)</code>
# that returns [+:rb+ or +:so+, path], which resolves the feature to
# the path the original Kernel#require method would load.
$LOAD_PATH: Array[String] & _LoadPathAPI
interface _LoadPathAPI
def resolve_feature_path: (path feature_path) -> [:rb | :so, String]?
end
# Contains the name of the script being executed. May be assignable.
$PROGRAM_NAME: String
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
# on the command line. Setting this to +nil+ disables warnings,
# including from Kernel#warn. Aliased to $-v and $-w.
$VERBOSE: bool?
# The output record separator for Kernel#print and IO#write. Default is +nil+.
$\: String?
# The last input line of string by gets or readline.
$_: String?
# The string to the left of the last successful match.
$`: String?
# The current standard error output.
$stderr: IO
# The current standard input.
$stdin: IO
# The current standard output.
$stdout: IO
# The information about the last match in the current scope (thread-local and frame-local).
$~: MatchData?