rbs 2.0.0 → 2.2.2

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.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +34 -0
  3. data/.github/workflows/ruby.yml +5 -0
  4. data/CHANGELOG.md +82 -0
  5. data/README.md +6 -1
  6. data/Rakefile +56 -21
  7. data/core/array.rbs +2866 -1086
  8. data/core/basic_object.rbs +150 -30
  9. data/core/binding.rbs +33 -0
  10. data/core/builtin.rbs +4 -4
  11. data/core/class.rbs +43 -5
  12. data/core/comparable.rbs +57 -0
  13. data/core/complex.rbs +170 -4
  14. data/core/constants.rbs +51 -0
  15. data/core/deprecated.rbs +7 -0
  16. data/core/dir.rbs +305 -20
  17. data/core/encoding.rbs +1214 -77
  18. data/core/enumerable.rbs +2173 -234
  19. data/core/enumerator.rbs +448 -182
  20. data/core/env.rbs +448 -1
  21. data/core/errno.rbs +1 -10
  22. data/core/errors.rbs +152 -2
  23. data/core/exception.rbs +201 -127
  24. data/core/false_class.rbs +27 -0
  25. data/core/fiber.rbs +118 -37
  26. data/core/fiber_error.rbs +8 -9
  27. data/core/file.rbs +1060 -142
  28. data/core/file_test.rbs +287 -32
  29. data/core/float.rbs +776 -300
  30. data/core/gc.rbs +185 -34
  31. data/core/global_variables.rbs +5 -1
  32. data/core/hash.rbs +1582 -649
  33. data/core/integer.rbs +974 -204
  34. data/core/io/buffer.rbs +710 -0
  35. data/core/io/wait.rbs +29 -8
  36. data/core/io.rbs +2438 -417
  37. data/core/kernel.rbs +2319 -318
  38. data/core/marshal.rbs +37 -2
  39. data/core/match_data.rbs +123 -6
  40. data/core/math.rbs +126 -6
  41. data/core/method.rbs +226 -102
  42. data/core/module.rbs +421 -45
  43. data/core/nil_class.rbs +64 -0
  44. data/core/numeric.rbs +620 -142
  45. data/core/object.rbs +453 -81
  46. data/core/object_space.rbs +92 -2
  47. data/core/proc.rbs +482 -285
  48. data/core/process.rbs +443 -34
  49. data/core/ractor.rbs +232 -9
  50. data/core/random.rbs +151 -52
  51. data/core/range.rbs +885 -160
  52. data/core/rational.rbs +122 -6
  53. data/core/rb_config.rbs +14 -4
  54. data/core/refinement.rbs +44 -0
  55. data/core/regexp.rbs +156 -14
  56. data/core/ruby_vm.rbs +42 -3
  57. data/core/signal.rbs +78 -39
  58. data/core/string.rbs +2123 -567
  59. data/core/string_io.rbs +204 -0
  60. data/core/struct.rbs +283 -28
  61. data/core/symbol.rbs +304 -30
  62. data/core/thread.rbs +1288 -688
  63. data/core/thread_group.rbs +66 -10
  64. data/core/time.rbs +643 -217
  65. data/core/trace_point.rbs +100 -12
  66. data/core/true_class.rbs +24 -0
  67. data/core/unbound_method.rbs +73 -7
  68. data/core/warning.rbs +37 -12
  69. data/docs/CONTRIBUTING.md +40 -34
  70. data/docs/stdlib.md +3 -102
  71. data/docs/syntax.md +54 -11
  72. data/ext/rbs_extension/extconf.rb +1 -0
  73. data/ext/rbs_extension/lexer.h +5 -0
  74. data/ext/rbs_extension/lexstate.c +6 -0
  75. data/ext/rbs_extension/parser.c +85 -10
  76. data/ext/rbs_extension/ruby_objs.c +4 -2
  77. data/ext/rbs_extension/ruby_objs.h +2 -2
  78. data/goodcheck.yml +0 -11
  79. data/lib/rbs/annotate/annotations.rb +197 -0
  80. data/lib/rbs/annotate/formatter.rb +80 -0
  81. data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
  82. data/lib/rbs/annotate/rdoc_source.rb +120 -0
  83. data/lib/rbs/annotate.rb +6 -0
  84. data/lib/rbs/ast/members.rb +21 -13
  85. data/lib/rbs/buffer.rb +17 -11
  86. data/lib/rbs/cli.rb +48 -1
  87. data/lib/rbs/definition_builder/method_builder.rb +28 -16
  88. data/lib/rbs/definition_builder.rb +6 -2
  89. data/lib/rbs/environment.rb +8 -4
  90. data/lib/rbs/location_aux.rb +12 -0
  91. data/lib/rbs/namespace.rb +1 -1
  92. data/lib/rbs/prototype/rb.rb +12 -0
  93. data/lib/rbs/type_alias_regularity.rb +6 -4
  94. data/lib/rbs/type_name.rb +1 -1
  95. data/lib/rbs/types.rb +1 -1
  96. data/lib/rbs/validator.rb +6 -0
  97. data/lib/rbs/version.rb +1 -1
  98. data/lib/rbs/writer.rb +54 -4
  99. data/lib/rbs.rb +0 -2
  100. data/schema/typeParam.json +3 -3
  101. data/sig/annotate/annotations.rbs +102 -0
  102. data/sig/annotate/formatter.rbs +24 -0
  103. data/sig/annotate/rdoc_annotater.rbs +82 -0
  104. data/sig/annotate/rdoc_source.rbs +30 -0
  105. data/sig/buffer.rbs +6 -2
  106. data/sig/cli.rbs +2 -0
  107. data/sig/collection/{collections.rbs → sources.rbs} +0 -0
  108. data/sig/location.rbs +6 -0
  109. data/sig/members.rbs +24 -18
  110. data/sig/method_builder.rbs +5 -4
  111. data/sig/method_types.rbs +5 -1
  112. data/sig/polyfill.rbs +78 -0
  113. data/sig/validator.rbs +3 -1
  114. data/sig/writer.rbs +79 -2
  115. data/stdlib/abbrev/0/abbrev.rbs +6 -0
  116. data/stdlib/abbrev/0/array.rbs +26 -0
  117. data/stdlib/base64/0/base64.rbs +31 -0
  118. data/stdlib/benchmark/0/benchmark.rbs +74 -3
  119. data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
  120. data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
  121. data/stdlib/cgi/0/core.rbs +649 -21
  122. data/stdlib/coverage/0/coverage.rbs +164 -2
  123. data/stdlib/csv/0/csv.rbs +2862 -398
  124. data/stdlib/date/0/date.rbs +483 -25
  125. data/stdlib/date/0/date_time.rbs +187 -12
  126. data/stdlib/dbm/0/dbm.rbs +152 -17
  127. data/stdlib/digest/0/digest.rbs +146 -0
  128. data/stdlib/erb/0/erb.rbs +65 -245
  129. data/stdlib/fiber/0/fiber.rbs +73 -91
  130. data/stdlib/fileutils/0/fileutils.rbs +301 -1
  131. data/stdlib/find/0/find.rbs +9 -0
  132. data/stdlib/forwardable/0/forwardable.rbs +65 -1
  133. data/stdlib/io-console/0/io-console.rbs +227 -15
  134. data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
  135. data/stdlib/json/0/json.rbs +1147 -145
  136. data/stdlib/logger/0/formatter.rbs +24 -0
  137. data/stdlib/logger/0/log_device.rbs +64 -0
  138. data/stdlib/logger/0/logger.rbs +165 -13
  139. data/stdlib/logger/0/period.rbs +10 -0
  140. data/stdlib/logger/0/severity.rbs +26 -0
  141. data/stdlib/monitor/0/monitor.rbs +163 -0
  142. data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
  143. data/stdlib/net-http/0/manifest.yaml +1 -0
  144. data/stdlib/net-http/0/net-http.rbs +1513 -683
  145. data/stdlib/nkf/0/nkf.rbs +372 -0
  146. data/stdlib/objspace/0/objspace.rbs +149 -90
  147. data/stdlib/openssl/0/openssl.rbs +8108 -71
  148. data/stdlib/optparse/0/optparse.rbs +487 -19
  149. data/stdlib/pathname/0/pathname.rbs +425 -124
  150. data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
  151. data/stdlib/prime/0/integer-extension.rbs +20 -2
  152. data/stdlib/prime/0/prime.rbs +88 -21
  153. data/stdlib/pstore/0/pstore.rbs +102 -0
  154. data/stdlib/pty/0/pty.rbs +64 -14
  155. data/stdlib/resolv/0/resolv.rbs +420 -31
  156. data/stdlib/rubygems/0/basic_specification.rbs +4 -1
  157. data/stdlib/rubygems/0/config_file.rbs +33 -1
  158. data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
  159. data/stdlib/rubygems/0/installer.rbs +13 -1
  160. data/stdlib/rubygems/0/path_support.rbs +4 -1
  161. data/stdlib/rubygems/0/platform.rbs +5 -1
  162. data/stdlib/rubygems/0/request_set.rbs +44 -2
  163. data/stdlib/rubygems/0/requirement.rbs +65 -2
  164. data/stdlib/rubygems/0/rubygems.rbs +407 -0
  165. data/stdlib/rubygems/0/source_list.rbs +13 -0
  166. data/stdlib/rubygems/0/specification.rbs +21 -1
  167. data/stdlib/rubygems/0/stream_ui.rbs +3 -1
  168. data/stdlib/rubygems/0/uninstaller.rbs +8 -1
  169. data/stdlib/rubygems/0/version.rbs +60 -157
  170. data/stdlib/securerandom/0/securerandom.rbs +44 -0
  171. data/stdlib/set/0/set.rbs +423 -109
  172. data/stdlib/shellwords/0/shellwords.rbs +55 -77
  173. data/stdlib/singleton/0/singleton.rbs +20 -0
  174. data/stdlib/socket/0/addrinfo.rbs +210 -9
  175. data/stdlib/socket/0/basic_socket.rbs +103 -11
  176. data/stdlib/socket/0/ip_socket.rbs +31 -9
  177. data/stdlib/socket/0/socket.rbs +586 -38
  178. data/stdlib/socket/0/tcp_server.rbs +22 -2
  179. data/stdlib/socket/0/tcp_socket.rbs +12 -1
  180. data/stdlib/socket/0/udp_socket.rbs +25 -2
  181. data/stdlib/socket/0/unix_server.rbs +22 -2
  182. data/stdlib/socket/0/unix_socket.rbs +45 -5
  183. data/stdlib/strscan/0/string_scanner.rbs +210 -9
  184. data/stdlib/tempfile/0/tempfile.rbs +58 -10
  185. data/stdlib/time/0/time.rbs +208 -116
  186. data/stdlib/timeout/0/timeout.rbs +10 -0
  187. data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
  188. data/stdlib/tsort/0/cyclic.rbs +1 -0
  189. data/stdlib/tsort/0/interfaces.rbs +1 -0
  190. data/stdlib/tsort/0/tsort.rbs +42 -0
  191. data/stdlib/uri/0/common.rbs +57 -8
  192. data/stdlib/uri/0/file.rbs +55 -109
  193. data/stdlib/uri/0/ftp.rbs +6 -3
  194. data/stdlib/uri/0/generic.rbs +558 -329
  195. data/stdlib/uri/0/http.rbs +60 -114
  196. data/stdlib/uri/0/https.rbs +8 -102
  197. data/stdlib/uri/0/ldap.rbs +143 -137
  198. data/stdlib/uri/0/ldaps.rbs +8 -102
  199. data/stdlib/uri/0/mailto.rbs +3 -0
  200. data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
  201. data/stdlib/uri/0/ws.rbs +6 -3
  202. data/stdlib/uri/0/wss.rbs +5 -3
  203. data/stdlib/yaml/0/dbm.rbs +151 -87
  204. data/stdlib/yaml/0/store.rbs +6 -0
  205. data/stdlib/zlib/0/zlib.rbs +90 -31
  206. metadata +18 -6
  207. data/lib/rbs/location.rb +0 -221
  208. data/sig/char_scanner.rbs +0 -9
@@ -0,0 +1,372 @@
1
+ # <!-- rdoc-file=ext/nkf/nkf.c -->
2
+ # NKF - Ruby extension for Network Kanji Filter
3
+ #
4
+ # ## Description
5
+ #
6
+ # This is a Ruby Extension version of nkf (Network Kanji Filter). It converts
7
+ # the first argument and returns converted result. Conversion details are
8
+ # specified by flags as the first argument.
9
+ #
10
+ # **Nkf** is a yet another kanji code converter among networks, hosts and
11
+ # terminals. It converts input kanji code to designated kanji code such as
12
+ # ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 or UTF-16.
13
+ #
14
+ # One of the most unique faculty of **nkf** is the guess of the input kanji
15
+ # encodings. It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 and
16
+ # UTF-16. So users needn't set the input kanji code explicitly.
17
+ #
18
+ # By default, X0201 kana is converted into X0208 kana. For X0201 kana, SO/SI,
19
+ # SSO and ESC-(-I methods are supported. For automatic code detection, nkf
20
+ # assumes no X0201 kana in Shift_JIS. To accept X0201 in Shift_JIS, use **-X**,
21
+ # **-x** or **-S**.
22
+ #
23
+ # ## Flags
24
+ #
25
+ # ### -b -u
26
+ #
27
+ # Output is buffered (DEFAULT), Output is unbuffered.
28
+ #
29
+ # ### -j -s -e -w -w16 -w32
30
+ #
31
+ # Output code is ISO-2022-JP (7bit JIS), Shift_JIS, EUC-JP, UTF-8N, UTF-16BE,
32
+ # UTF-32BE. Without this option and compile option, ISO-2022-JP is assumed.
33
+ #
34
+ # ### -J -S -E -W -W16 -W32
35
+ #
36
+ # Input assumption is JIS 7 bit, Shift_JIS, EUC-JP, UTF-8, UTF-16, UTF-32.
37
+ #
38
+ # #### -J
39
+ #
40
+ # Assume JIS input. It also accepts EUC-JP. This is the default. This flag does
41
+ # not exclude Shift_JIS.
42
+ #
43
+ # #### -S
44
+ #
45
+ # Assume Shift_JIS and X0201 kana input. It also accepts JIS. EUC-JP is
46
+ # recognized as X0201 kana. Without **-x** flag, X0201 kana (halfwidth kana) is
47
+ # converted into X0208.
48
+ #
49
+ # #### -E
50
+ #
51
+ # Assume EUC-JP input. It also accepts JIS. Same as -J.
52
+ #
53
+ # ### -t
54
+ #
55
+ # No conversion.
56
+ #
57
+ # ### -i_
58
+ #
59
+ # Output sequence to designate JIS-kanji. (DEFAULT B)
60
+ #
61
+ # ### -o_
62
+ #
63
+ # Output sequence to designate ASCII. (DEFAULT B)
64
+ #
65
+ # ### -r
66
+ #
67
+ # {de/en}crypt ROT13/47
68
+ #
69
+ # ### -[h](123) --hiragana --katakana --katakana-hiragana
70
+ #
71
+ # -h1 --hiragana
72
+ # : Katakana to Hiragana conversion.
73
+ #
74
+ # -h2 --katakana
75
+ # : Hiragana to Katakana conversion.
76
+ #
77
+ # -h3 --katakana-hiragana
78
+ # : Katakana to Hiragana and Hiragana to Katakana conversion.
79
+ #
80
+ #
81
+ # ### -T
82
+ #
83
+ # Text mode output (MS-DOS)
84
+ #
85
+ # ### -l
86
+ #
87
+ # ISO8859-1 (Latin-1) support
88
+ #
89
+ # ### -f[`m` [- `n`]]
90
+ #
91
+ # Folding on `m` length with `n` margin in a line. Without this option, fold
92
+ # length is 60 and fold margin is 10.
93
+ #
94
+ # ### -F
95
+ #
96
+ # New line preserving line folding.
97
+ #
98
+ # ### -[Z](0-3)
99
+ #
100
+ # Convert X0208 alphabet (Fullwidth Alphabets) to ASCII.
101
+ #
102
+ # -Z -Z0
103
+ # : Convert X0208 alphabet to ASCII.
104
+ #
105
+ # -Z1
106
+ # : Converts X0208 kankaku to single ASCII space.
107
+ #
108
+ # -Z2
109
+ # : Converts X0208 kankaku to double ASCII spaces.
110
+ #
111
+ # -Z3
112
+ # : Replacing Fullwidth >, <, ", & into '&gt;', '&lt;', '&quot;', '&amp;' as
113
+ # in HTML.
114
+ #
115
+ #
116
+ # ### -X -x
117
+ #
118
+ # Assume X0201 kana in MS-Kanji. With **-X** or without this option, X0201 is
119
+ # converted into X0208 Kana. With **-x**, try to preserve X0208 kana and do not
120
+ # convert X0201 kana to X0208. In JIS output, ESC-(-I is used. In EUC output,
121
+ # SSO is used.
122
+ #
123
+ # ### -[B](0-2)
124
+ #
125
+ # Assume broken JIS-Kanji input, which lost ESC. Useful when your site is using
126
+ # old B-News Nihongo patch.
127
+ #
128
+ # -B1
129
+ # : allows any char after ESC-( or ESC-$.
130
+ #
131
+ # -B2
132
+ # : forces ASCII after NL.
133
+ #
134
+ #
135
+ # ### -I
136
+ #
137
+ # Replacing non iso-2022-jp char into a geta character (substitute character in
138
+ # Japanese).
139
+ #
140
+ # ### -d -c
141
+ #
142
+ # Delete r in line feed, Add r in line feed.
143
+ #
144
+ # ### -[m](BQN0)
145
+ #
146
+ # MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT) To see ISO8859-1 (Latin-1) -l is
147
+ # necessary.
148
+ #
149
+ # -mB
150
+ # : Decode MIME base64 encoded stream. Remove header or other part before
151
+ #
152
+ # conversion.
153
+ #
154
+ # -mQ
155
+ # : Decode MIME quoted stream. '_' in quoted stream is converted to space.
156
+ #
157
+ # -mN
158
+ # : Non-strict decoding.
159
+ #
160
+ # It allows line break in the middle of the base64 encoding.
161
+ #
162
+ # -m0
163
+ # : No MIME decode.
164
+ #
165
+ #
166
+ # ### -M
167
+ #
168
+ # MIME encode. Header style. All ASCII code and control characters are intact.
169
+ # Kanji conversion is performed before encoding, so this cannot be used as a
170
+ # picture encoder.
171
+ #
172
+ # -MB
173
+ # : MIME encode Base64 stream.
174
+ #
175
+ # -MQ
176
+ # : Perform quoted encoding.
177
+ #
178
+ #
179
+ # ### -l
180
+ #
181
+ # Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP. **-s**, **-e**
182
+ # and **-x** are not compatible with this option.
183
+ #
184
+ # ### -[L](uwm)
185
+ #
186
+ # new line mode Without this option, nkf doesn't convert line breaks.
187
+ #
188
+ # -Lu
189
+ # : unix (LF)
190
+ #
191
+ # -Lw
192
+ # : windows (CRLF)
193
+ #
194
+ # -Lm
195
+ # : mac (CR)
196
+ #
197
+ #
198
+ # ### --fj --unix --mac --msdos --windows
199
+ #
200
+ # convert for these system
201
+ #
202
+ # ### --jis --euc --sjis --mime --base64
203
+ #
204
+ # convert for named code
205
+ #
206
+ # ### --jis-input --euc-input --sjis-input --mime-input --base64-input
207
+ #
208
+ # assume input system
209
+ #
210
+ # ### --ic=`input codeset` --oc=`output codeset`
211
+ #
212
+ # Set the input or output codeset. NKF supports following codesets and those
213
+ # codeset name are case insensitive.
214
+ #
215
+ # ISO-2022-JP
216
+ # : a.k.a. RFC1468, 7bit JIS, JUNET
217
+ #
218
+ # EUC-JP (eucJP-nkf)
219
+ # : a.k.a. AT&T JIS, Japanese EUC, UJIS
220
+ #
221
+ # eucJP-ascii
222
+ # : a.k.a. x-eucjp-open-19970715-ascii
223
+ #
224
+ # eucJP-ms
225
+ # : a.k.a. x-eucjp-open-19970715-ms
226
+ #
227
+ # CP51932
228
+ # : Microsoft Version of EUC-JP.
229
+ #
230
+ # Shift_JIS
231
+ # : SJIS, MS-Kanji
232
+ #
233
+ # Windows-31J
234
+ # : a.k.a. CP932
235
+ #
236
+ # UTF-8
237
+ # : same as UTF-8N
238
+ #
239
+ # UTF-8N
240
+ # : UTF-8 without BOM
241
+ #
242
+ # UTF-8-BOM
243
+ # : UTF-8 with BOM
244
+ #
245
+ # UTF-16
246
+ # : same as UTF-16BE
247
+ #
248
+ # UTF-16BE
249
+ # : UTF-16 Big Endian without BOM
250
+ #
251
+ # UTF-16BE-BOM
252
+ # : UTF-16 Big Endian with BOM
253
+ #
254
+ # UTF-16LE
255
+ # : UTF-16 Little Endian without BOM
256
+ #
257
+ # UTF-16LE-BOM
258
+ # : UTF-16 Little Endian with BOM
259
+ #
260
+ # UTF-32
261
+ # : same as UTF-32BE
262
+ #
263
+ # UTF-32BE
264
+ # : UTF-32 Big Endian without BOM
265
+ #
266
+ # UTF-32BE-BOM
267
+ # : UTF-32 Big Endian with BOM
268
+ #
269
+ # UTF-32LE
270
+ # : UTF-32 Little Endian without BOM
271
+ #
272
+ # UTF-32LE-BOM
273
+ # : UTF-32 Little Endian with BOM
274
+ #
275
+ # UTF8-MAC
276
+ # : NKDed UTF-8, a.k.a. UTF8-NFD (input only)
277
+ #
278
+ #
279
+ # ### --fb-{skip, html, xml, perl, java, subchar}
280
+ #
281
+ # Specify the way that nkf handles unassigned characters. Without this option,
282
+ # --fb-skip is assumed.
283
+ #
284
+ # ### --prefix= `escape character` `target character` ..
285
+ #
286
+ # When nkf converts to Shift_JIS, nkf adds a specified escape character to
287
+ # specified 2nd byte of Shift_JIS characters. 1st byte of argument is the escape
288
+ # character and following bytes are target characters.
289
+ #
290
+ # ### --no-cp932ext
291
+ #
292
+ # Handle the characters extended in CP932 as unassigned characters.
293
+ #
294
+ # ## --no-best-fit-chars
295
+ #
296
+ # When Unicode to Encoded byte conversion, don't convert characters which is not
297
+ # round trip safe. When Unicode to Unicode conversion, with this and -x option,
298
+ # nkf can be used as UTF converter. (In other words, without this and -x option,
299
+ # nkf doesn't save some characters)
300
+ #
301
+ # When nkf convert string which related to path, you should use this option.
302
+ #
303
+ # ### --cap-input
304
+ #
305
+ # Decode hex encoded characters.
306
+ #
307
+ # ### --url-input
308
+ #
309
+ # Unescape percent escaped characters.
310
+ #
311
+ # ### --
312
+ #
313
+ # Ignore rest of -option.
314
+ #
315
+ module NKF
316
+ # <!--
317
+ # rdoc-file=ext/nkf/nkf.c
318
+ # - NKF.guess(str) => encoding
319
+ # -->
320
+ # Returns guessed encoding of *str* by nkf routine.
321
+ #
322
+ def self.guess: (String str) -> Encoding
323
+
324
+ # <!--
325
+ # rdoc-file=ext/nkf/nkf.c
326
+ # - NKF.nkf(opt, str) => string
327
+ # -->
328
+ # Convert *str* and return converted result. Conversion details are specified by
329
+ # *opt* as String.
330
+ #
331
+ # require 'nkf'
332
+ # output = NKF.nkf("-s", input)
333
+ #
334
+ def self.nkf: (String opt, String str) -> String
335
+ end
336
+
337
+ NKF::ASCII: Encoding
338
+
339
+ NKF::AUTO: nil
340
+
341
+ NKF::BINARY: Encoding
342
+
343
+ NKF::EUC: Encoding
344
+
345
+ NKF::JIS: Encoding
346
+
347
+ # <!-- rdoc-file=ext/nkf/nkf.c -->
348
+ # Release date of nkf
349
+ #
350
+ NKF::NKF_RELEASE_DATE: String
351
+
352
+ # <!-- rdoc-file=ext/nkf/nkf.c -->
353
+ # Version of nkf
354
+ #
355
+ NKF::NKF_VERSION: String
356
+
357
+ NKF::NOCONV: nil
358
+
359
+ NKF::SJIS: Encoding
360
+
361
+ NKF::UNKNOWN: nil
362
+
363
+ NKF::UTF16: Encoding
364
+
365
+ NKF::UTF32: Encoding
366
+
367
+ NKF::UTF8: Encoding
368
+
369
+ # <!-- rdoc-file=ext/nkf/nkf.c -->
370
+ # Full version string of nkf
371
+ #
372
+ NKF::VERSION: String