rbs 3.6.0.dev.1 → 3.6.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +28 -1
- data/CHANGELOG.md +87 -0
- data/Rakefile +8 -2
- data/core/basic_object.rbs +1 -1
- data/core/builtin.rbs +4 -4
- data/core/dir.rbs +1 -1
- data/core/enumerable.rbs +12 -12
- data/core/enumerator/product.rbs +1 -1
- data/core/enumerator.rbs +3 -3
- data/core/errors.rbs +1 -1
- data/core/exception.rbs +1 -1
- data/core/file.rbs +1 -1
- data/core/integer.rbs +4 -4
- data/core/kernel.rbs +3 -3
- data/core/module.rbs +1 -1
- data/core/random.rbs +1 -1
- data/core/rbs/unnamed/env_class.rbs +7 -7
- data/core/rbs/unnamed/random.rbs +14 -14
- data/core/regexp.rbs +2 -2
- data/core/thread.rbs +6 -5
- data/core/trace_point.rbs +2 -2
- data/docs/syntax.md +5 -3
- data/ext/rbs_extension/lexer.c +1 -1
- data/ext/rbs_extension/lexer.h +5 -0
- data/ext/rbs_extension/lexer.re +1 -1
- data/ext/rbs_extension/lexstate.c +16 -0
- data/ext/rbs_extension/location.c +27 -39
- data/ext/rbs_extension/location.h +7 -2
- data/ext/rbs_extension/parser.c +1 -1
- data/lib/rbs/buffer.rb +5 -0
- data/lib/rbs/cli/validate.rb +41 -1
- data/lib/rbs/errors.rb +1 -1
- data/lib/rbs/location_aux.rb +2 -6
- data/lib/rbs/prototype/rb.rb +2 -2
- data/lib/rbs/test/type_check.rb +7 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/location.rbs +0 -3
- data/sig/types.rbs +12 -5
- data/stdlib/csv/0/csv.rbs +17 -6
- data/stdlib/digest/0/digest.rbs +22 -28
- data/stdlib/ipaddr/0/ipaddr.rbs +1 -1
- data/stdlib/kconv/0/kconv.rbs +166 -0
- data/stdlib/net-http/0/net-http.rbs +1 -1
- data/stdlib/psych/0/store.rbs +1 -1
- data/stdlib/uri/0/ldap.rbs +1 -1
- data/stdlib/zlib/0/deflate.rbs +1 -1
- metadata +4 -3
@@ -0,0 +1,166 @@
|
|
1
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
2
|
+
# Kanji Converter for Ruby.
|
3
|
+
#
|
4
|
+
module Kconv
|
5
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
6
|
+
# ASCII
|
7
|
+
#
|
8
|
+
ASCII: Encoding
|
9
|
+
|
10
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
11
|
+
# Auto-Detect
|
12
|
+
#
|
13
|
+
AUTO: nil
|
14
|
+
|
15
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
16
|
+
# BINARY
|
17
|
+
#
|
18
|
+
BINARY: Encoding
|
19
|
+
|
20
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
21
|
+
# EUC-JP
|
22
|
+
#
|
23
|
+
EUC: Encoding
|
24
|
+
|
25
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
26
|
+
# ISO-2022-JP
|
27
|
+
#
|
28
|
+
JIS: Encoding
|
29
|
+
|
30
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
31
|
+
# NOCONV
|
32
|
+
#
|
33
|
+
NOCONV: nil
|
34
|
+
|
35
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
36
|
+
# Shift_JIS
|
37
|
+
#
|
38
|
+
SJIS: Encoding
|
39
|
+
|
40
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
41
|
+
# UNKNOWN
|
42
|
+
#
|
43
|
+
UNKNOWN: nil
|
44
|
+
|
45
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
46
|
+
# UTF-16
|
47
|
+
#
|
48
|
+
UTF16: Encoding
|
49
|
+
|
50
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
51
|
+
# UTF-32
|
52
|
+
#
|
53
|
+
UTF32: Encoding
|
54
|
+
|
55
|
+
# <!-- rdoc-file=ext/nkf/lib/kconv.rb -->
|
56
|
+
# UTF-8
|
57
|
+
#
|
58
|
+
UTF8: Encoding
|
59
|
+
|
60
|
+
# <!--
|
61
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
62
|
+
# - Kconv.guess(str) => encoding
|
63
|
+
# -->
|
64
|
+
# Guess input encoding by NKF.guess
|
65
|
+
#
|
66
|
+
def self.guess: (String str) -> Encoding
|
67
|
+
|
68
|
+
# <!--
|
69
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
70
|
+
# - Kconv.iseuc(str) => true or false
|
71
|
+
# -->
|
72
|
+
# Returns whether input encoding is EUC-JP or not.
|
73
|
+
#
|
74
|
+
# **Note** don't expect this return value is MatchData.
|
75
|
+
#
|
76
|
+
def self.iseuc: (String str) -> bool
|
77
|
+
|
78
|
+
# <!--
|
79
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
80
|
+
# - Kconv.isjis(str) => true or false
|
81
|
+
# -->
|
82
|
+
# Returns whether input encoding is ISO-2022-JP or not.
|
83
|
+
#
|
84
|
+
def self.isjis: (String str) -> bool
|
85
|
+
|
86
|
+
# <!--
|
87
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
88
|
+
# - Kconv.issjis(str) => true or false
|
89
|
+
# -->
|
90
|
+
# Returns whether input encoding is Shift_JIS or not.
|
91
|
+
#
|
92
|
+
def self.issjis: (String str) -> bool
|
93
|
+
|
94
|
+
# <!--
|
95
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
96
|
+
# - Kconv.isutf8(str) => true or false
|
97
|
+
# -->
|
98
|
+
# Returns whether input encoding is UTF-8 or not.
|
99
|
+
#
|
100
|
+
def self.isutf8: (String str) -> bool
|
101
|
+
|
102
|
+
# <!--
|
103
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
104
|
+
# - Kconv.kconv(str, to_enc, from_enc=nil)
|
105
|
+
# -->
|
106
|
+
# Convert `str` to `to_enc`. `to_enc` and `from_enc` are given as constants of
|
107
|
+
# Kconv or Encoding objects.
|
108
|
+
#
|
109
|
+
def self.kconv: (String str, Encoding? out_code, ?Encoding? in_code) -> String
|
110
|
+
|
111
|
+
# <!--
|
112
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
113
|
+
# - Kconv.toeuc(str) => string
|
114
|
+
# -->
|
115
|
+
# Convert `str` to EUC-JP
|
116
|
+
#
|
117
|
+
def self.toeuc: (String str) -> String
|
118
|
+
|
119
|
+
# <!--
|
120
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
121
|
+
# - Kconv.tojis(str) => string
|
122
|
+
# -->
|
123
|
+
# Convert `str` to ISO-2022-JP
|
124
|
+
#
|
125
|
+
def self.tojis: (String str) -> String
|
126
|
+
|
127
|
+
# <!--
|
128
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
129
|
+
# - Kconv.tolocale => string
|
130
|
+
# -->
|
131
|
+
# Convert `self` to locale encoding
|
132
|
+
#
|
133
|
+
def self.tolocale: (String str) -> String
|
134
|
+
|
135
|
+
# <!--
|
136
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
137
|
+
# - Kconv.tosjis(str) => string
|
138
|
+
# -->
|
139
|
+
# Convert `str` to Shift_JIS
|
140
|
+
#
|
141
|
+
def self.tosjis: (String str) -> String
|
142
|
+
|
143
|
+
# <!--
|
144
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
145
|
+
# - Kconv.toutf16(str) => string
|
146
|
+
# -->
|
147
|
+
# Convert `str` to UTF-16
|
148
|
+
#
|
149
|
+
def self.toutf16: (String str) -> String
|
150
|
+
|
151
|
+
# <!--
|
152
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
153
|
+
# - Kconv.toutf32(str) => string
|
154
|
+
# -->
|
155
|
+
# Convert `str` to UTF-32
|
156
|
+
#
|
157
|
+
def self.toutf32: (String str) -> String
|
158
|
+
|
159
|
+
# <!--
|
160
|
+
# rdoc-file=ext/nkf/lib/kconv.rb
|
161
|
+
# - Kconv.toutf8(str) => string
|
162
|
+
# -->
|
163
|
+
# Convert `str` to UTF-8
|
164
|
+
#
|
165
|
+
def self.toutf8: (String str) -> String
|
166
|
+
end
|
@@ -2078,7 +2078,7 @@ module Net
|
|
2078
2078
|
# - new(m, reqbody, resbody, uri_or_path, initheader = nil)
|
2079
2079
|
# -->
|
2080
2080
|
#
|
2081
|
-
def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?headers initheader) ->
|
2081
|
+
def initialize: (String m, boolish reqbody, boolish resbody, URI::Generic | String uri_or_path, ?headers initheader) -> void
|
2082
2082
|
|
2083
2083
|
# <!-- rdoc-file=lib/net/http/generic_request.rb -->
|
2084
2084
|
# Returns the string method name for the request:
|
data/stdlib/psych/0/store.rbs
CHANGED
@@ -45,7 +45,7 @@ class Psych::Store < ::PStore
|
|
45
45
|
# Options passed in through `yaml_opts` will be used when converting the store
|
46
46
|
# to YAML via Hash#to_yaml().
|
47
47
|
#
|
48
|
-
def initialize: (*untyped o) ->
|
48
|
+
def initialize: (*untyped o) -> void
|
49
49
|
|
50
50
|
def dump: (untyped table) -> String
|
51
51
|
|
data/stdlib/uri/0/ldap.rbs
CHANGED
@@ -71,7 +71,7 @@ module URI
|
|
71
71
|
#
|
72
72
|
# See also URI::Generic.new.
|
73
73
|
#
|
74
|
-
def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) ->
|
74
|
+
def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> void
|
75
75
|
|
76
76
|
# <!--
|
77
77
|
# rdoc-file=lib/uri/ldap.rb
|
data/stdlib/zlib/0/deflate.rbs
CHANGED
@@ -154,7 +154,7 @@ module Zlib
|
|
154
154
|
# SYNC_FLUSH, FULL_FLUSH and FINISH.
|
155
155
|
#
|
156
156
|
def flush: (?Integer flush) -> String
|
157
|
-
| (?Integer flush) {(String chunk) -> nil } -> nil
|
157
|
+
| (?Integer flush) { (String chunk) -> nil } -> nil
|
158
158
|
|
159
159
|
# <!--
|
160
160
|
# rdoc-file=ext/zlib/zlib.c
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.0.
|
4
|
+
version: 3.6.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logger
|
@@ -371,6 +371,7 @@ files:
|
|
371
371
|
- stdlib/io-console/0/io-console.rbs
|
372
372
|
- stdlib/ipaddr/0/ipaddr.rbs
|
373
373
|
- stdlib/json/0/json.rbs
|
374
|
+
- stdlib/kconv/0/kconv.rbs
|
374
375
|
- stdlib/logger/0/formatter.rbs
|
375
376
|
- stdlib/logger/0/log_device.rbs
|
376
377
|
- stdlib/logger/0/logger.rbs
|
@@ -530,7 +531,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
530
531
|
- !ruby/object:Gem::Version
|
531
532
|
version: '0'
|
532
533
|
requirements: []
|
533
|
-
rubygems_version: 3.5.
|
534
|
+
rubygems_version: 3.5.11
|
534
535
|
signing_key:
|
535
536
|
specification_version: 4
|
536
537
|
summary: Type signature for Ruby.
|