rbs 2.8.0 → 2.8.1
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/workflows/comments.yml +1 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +2 -2
- data/core/io/buffer.rbs +13 -5
- data/core/method.rbs +9 -1
- data/core/rbs/unnamed/argf.rbs +6 -6
- data/core/rubygems/rubygems.rbs +2 -2
- data/core/unbound_method.rbs +9 -1
- data/lib/rbs/cli.rb +6 -2
- data/lib/rbs/version.rb +1 -1
- data/stdlib/cgi/0/core.rbs +18 -9
- data/stdlib/csv/0/csv.rbs +738 -217
- data/stdlib/net-http/0/net-http.rbs +1 -20
- data/stdlib/yaml/0/yaml.rbs +30 -2
- data/steep/Gemfile.lock +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7260861dc5546d0f4673c4cbff61a97b222553fbedb0f0cf7b45fffa7e70fc29
|
4
|
+
data.tar.gz: 3a354b926470d26670ac209c3190f0a934289126b4ed484180eebf81d9c9a076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07842180f916e2726333424a6263e05f8cfff54a1165c144fd6dab1137ab26a129ca0a5d22531483868a2cf1b3008bc8e617893f98de4d9433bb0b482fc910ce'
|
7
|
+
data.tar.gz: 861ac0661a1784d29c2bff49683d4d679d84bf788f20bf899a5c6596d341437a38dc1eb8072f027c44f199f17b0e056203db097056306c6363ac5076072045a8
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 2.8.1 (2022-11-28)
|
6
|
+
|
7
|
+
### Signature updates
|
8
|
+
|
9
|
+
* Update documents based on ruby-3.1.3 ([#1160](https://github.com/ruby/rbs/pull/1160))
|
10
|
+
|
11
|
+
### Library changes
|
12
|
+
|
13
|
+
#### rbs collection
|
14
|
+
|
15
|
+
* Delay loading `Gemfile` for unbundled environments ([#1161](https://github.com/ruby/rbs/pull/1161))
|
16
|
+
|
17
|
+
### Miscellaneous
|
18
|
+
|
19
|
+
* Fix collection tests ([#1159](https://github.com/ruby/rbs/pull/1159), [#1162](https://github.com/ruby/rbs/pull/1162))
|
20
|
+
|
5
21
|
## 2.8.0 (2022-11-24)
|
6
22
|
|
7
23
|
### Signature updates
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rbs (2.8.
|
4
|
+
rbs (2.8.1)
|
5
5
|
|
6
6
|
PATH
|
7
7
|
remote: test/assets/test-gem
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
63
63
|
rspec-support (~> 3.12.0)
|
64
64
|
rspec-support (3.12.0)
|
65
|
-
rubocop (1.
|
65
|
+
rubocop (1.39.0)
|
66
66
|
json (~> 2.3)
|
67
67
|
parallel (~> 1.10)
|
68
68
|
parser (>= 3.1.2.1)
|
data/core/io/buffer.rbs
CHANGED
@@ -88,11 +88,13 @@ class IO
|
|
88
88
|
|
89
89
|
# <!--
|
90
90
|
# rdoc-file=io_buffer.c
|
91
|
-
# - IO::Buffer.for(string) -> io_buffer
|
91
|
+
# - IO::Buffer.for(string) -> readonly io_buffer
|
92
|
+
# - IO::Buffer.for(string) {|io_buffer| ... read/write io_buffer ...}
|
92
93
|
# -->
|
93
|
-
# Creates a IO::Buffer from the given string's memory.
|
94
|
-
#
|
95
|
-
#
|
94
|
+
# Creates a IO::Buffer from the given string's memory. Without a block a frozen
|
95
|
+
# internal copy of the string is created efficiently and used as the buffer
|
96
|
+
# source. When a block is provided, the buffer is associated directly with the
|
97
|
+
# string's internal data and updating the buffer will update the string.
|
96
98
|
#
|
97
99
|
# Until #free is invoked on the buffer, either explicitly or via the garbage
|
98
100
|
# collector, the source string will be locked and cannot be modified.
|
@@ -101,7 +103,7 @@ class IO
|
|
101
103
|
# modified.
|
102
104
|
#
|
103
105
|
# string = 'test'
|
104
|
-
# buffer = IO::Buffer.for(
|
106
|
+
# buffer = IO::Buffer.for(string)
|
105
107
|
# buffer.external? #=> true
|
106
108
|
#
|
107
109
|
# buffer.get_string(0, 1)
|
@@ -112,6 +114,12 @@ class IO
|
|
112
114
|
# buffer.resize(100)
|
113
115
|
# # in `resize': Cannot resize external buffer! (IO::Buffer::AccessError)
|
114
116
|
#
|
117
|
+
# IO::Buffer.for(string) do |buffer|
|
118
|
+
# buffer.set_string("T")
|
119
|
+
# string
|
120
|
+
# # => "Test"
|
121
|
+
# end
|
122
|
+
#
|
115
123
|
def self.for: (String) -> Buffer
|
116
124
|
|
117
125
|
# <!--
|
data/core/method.rbs
CHANGED
@@ -220,7 +220,15 @@ class Method < Object
|
|
220
220
|
# rdoc-file=proc.c
|
221
221
|
# - meth.owner -> class_or_module
|
222
222
|
# -->
|
223
|
-
# Returns the class or module
|
223
|
+
# Returns the class or module on which this method is defined. In other words,
|
224
|
+
#
|
225
|
+
# meth.owner.instance_methods(false).include?(meth.name) # => true
|
226
|
+
#
|
227
|
+
# holds as long as the method is not removed/undefined/replaced, (with
|
228
|
+
# private_instance_methods instead of instance_methods if the method is
|
229
|
+
# private).
|
230
|
+
#
|
231
|
+
# See also Method#receiver.
|
224
232
|
#
|
225
233
|
# (1..3).method(:map).owner #=> Enumerable
|
226
234
|
#
|
data/core/rbs/unnamed/argf.rbs
CHANGED
@@ -768,15 +768,15 @@ module RBS
|
|
768
768
|
|
769
769
|
# <!--
|
770
770
|
# rdoc-file=io.c
|
771
|
-
# - ARGF.readlines(sep
|
771
|
+
# - ARGF.readlines(sep = $/) -> array
|
772
772
|
# - ARGF.readlines(limit) -> array
|
773
773
|
# - ARGF.readlines(sep, limit) -> array
|
774
|
-
# - ARGF.to_a(sep
|
774
|
+
# - ARGF.to_a(sep = $/) -> array
|
775
775
|
# - ARGF.to_a(limit) -> array
|
776
776
|
# - ARGF.to_a(sep, limit) -> array
|
777
777
|
# -->
|
778
|
-
# Reads `ARGF`
|
779
|
-
# lines
|
778
|
+
# Reads each file in `ARGF` in its entirety, returning an `Array` containing
|
779
|
+
# lines from the files. Lines are assumed to be separated by *sep*.
|
780
780
|
#
|
781
781
|
# lines = ARGF.readlines
|
782
782
|
# lines[0] #=> "This is line one\n"
|
@@ -893,8 +893,8 @@ module RBS
|
|
893
893
|
def tell: () -> Integer
|
894
894
|
|
895
895
|
# <!-- rdoc-file=io.c -->
|
896
|
-
# Reads `ARGF`
|
897
|
-
# lines
|
896
|
+
# Reads each file in `ARGF` in its entirety, returning an `Array` containing
|
897
|
+
# lines from the files. Lines are assumed to be separated by *sep*.
|
898
898
|
#
|
899
899
|
# lines = ARGF.readlines
|
900
900
|
# lines[0] #=> "This is line one\n"
|
data/core/rubygems/rubygems.rbs
CHANGED
@@ -155,8 +155,8 @@ module Gem
|
|
155
155
|
# rdoc-file=lib/rubygems.rb
|
156
156
|
# - activated_gem_paths()
|
157
157
|
# -->
|
158
|
-
# The number of paths in the
|
159
|
-
# prioritize `-I` and
|
158
|
+
# The number of paths in the +$LOAD_PATH+ from activated gems. Used to
|
159
|
+
# prioritize `-I` and +[ENV]('RUBYLIB')+ entries during `require`.
|
160
160
|
#
|
161
161
|
def self.activated_gem_paths: () -> Integer
|
162
162
|
|
data/core/unbound_method.rbs
CHANGED
@@ -153,7 +153,15 @@ class UnboundMethod
|
|
153
153
|
# rdoc-file=proc.c
|
154
154
|
# - meth.owner -> class_or_module
|
155
155
|
# -->
|
156
|
-
# Returns the class or module
|
156
|
+
# Returns the class or module on which this method is defined. In other words,
|
157
|
+
#
|
158
|
+
# meth.owner.instance_methods(false).include?(meth.name) # => true
|
159
|
+
#
|
160
|
+
# holds as long as the method is not removed/undefined/replaced, (with
|
161
|
+
# private_instance_methods instead of instance_methods if the method is
|
162
|
+
# private).
|
163
|
+
#
|
164
|
+
# See also Method#receiver.
|
157
165
|
#
|
158
166
|
# (1..3).method(:map).owner #=> Enumerable
|
159
167
|
#
|
data/lib/rbs/cli.rb
CHANGED
@@ -58,7 +58,7 @@ module RBS
|
|
58
58
|
self.core_root = nil
|
59
59
|
end
|
60
60
|
|
61
|
-
opts.on('--collection PATH', "File path of collection configuration (default: #{
|
61
|
+
opts.on('--collection PATH', "File path of collection configuration (default: #{@config_path})") do |path|
|
62
62
|
self.config_path = Pathname(path).expand_path
|
63
63
|
end
|
64
64
|
|
@@ -1034,15 +1034,17 @@ EOB
|
|
1034
1034
|
opts.order args.drop(1), into: params
|
1035
1035
|
config_path = options.config_path or raise
|
1036
1036
|
lock_path = Collection::Config.to_lockfile_path(config_path)
|
1037
|
-
gemfile_lock_path = Bundler.default_lockfile
|
1038
1037
|
|
1039
1038
|
case args[0]
|
1040
1039
|
when 'install'
|
1041
1040
|
unless params[:frozen]
|
1041
|
+
gemfile_lock_path = Bundler.default_lockfile
|
1042
1042
|
Collection::Config.generate_lockfile(config_path: config_path, gemfile_lock_path: gemfile_lock_path)
|
1043
1043
|
end
|
1044
1044
|
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
|
1045
1045
|
when 'update'
|
1046
|
+
gemfile_lock_path = Bundler.default_lockfile
|
1047
|
+
|
1046
1048
|
# TODO: Be aware of argv to update only specified gem
|
1047
1049
|
Collection::Config.generate_lockfile(config_path: config_path, gemfile_lock_path: gemfile_lock_path, with_lockfile: false)
|
1048
1050
|
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
|
@@ -1101,6 +1103,8 @@ EOB
|
|
1101
1103
|
|
1102
1104
|
# Update the RBSs
|
1103
1105
|
$ rbs collection update
|
1106
|
+
|
1107
|
+
Options:
|
1104
1108
|
HELP
|
1105
1109
|
opts.on('--frozen') if args[0] == 'install'
|
1106
1110
|
end
|
data/lib/rbs/version.rb
CHANGED
data/stdlib/cgi/0/core.rbs
CHANGED
@@ -149,7 +149,7 @@
|
|
149
149
|
# cgi.has_key?('field_name')
|
150
150
|
# cgi.include?('field_name')
|
151
151
|
#
|
152
|
-
# CAUTION! [
|
152
|
+
# CAUTION! `cgi['field_name']` returned an Array with the old cgi.rb(included in
|
153
153
|
# Ruby 1.6)
|
154
154
|
#
|
155
155
|
# ### Get form values as hash
|
@@ -713,8 +713,11 @@ class CGI
|
|
713
713
|
#
|
714
714
|
def domain: () -> String?
|
715
715
|
|
716
|
-
# <!--
|
717
|
-
#
|
716
|
+
# <!--
|
717
|
+
# rdoc-file=lib/cgi/cookie.rb
|
718
|
+
# - domain=(str)
|
719
|
+
# -->
|
720
|
+
# Set domain for which this cookie applies
|
718
721
|
#
|
719
722
|
def domain=: (String domain) -> String
|
720
723
|
|
@@ -756,8 +759,11 @@ class CGI
|
|
756
759
|
#
|
757
760
|
def name: () -> String
|
758
761
|
|
759
|
-
# <!--
|
760
|
-
#
|
762
|
+
# <!--
|
763
|
+
# rdoc-file=lib/cgi/cookie.rb
|
764
|
+
# - name=(str)
|
765
|
+
# -->
|
766
|
+
# Set name of this cookie
|
761
767
|
#
|
762
768
|
def name=: (String name) -> String
|
763
769
|
|
@@ -766,8 +772,11 @@ class CGI
|
|
766
772
|
#
|
767
773
|
def path: () -> String?
|
768
774
|
|
769
|
-
# <!--
|
770
|
-
#
|
775
|
+
# <!--
|
776
|
+
# rdoc-file=lib/cgi/cookie.rb
|
777
|
+
# - path=(str)
|
778
|
+
# -->
|
779
|
+
# Set path for which this cookie applies
|
771
780
|
#
|
772
781
|
def path=: (String path) -> String
|
773
782
|
|
@@ -861,7 +870,7 @@ class CGI
|
|
861
870
|
# rdoc-file=ext/cgi/escape/escape.c
|
862
871
|
# - CGI.escape(string) -> string
|
863
872
|
# -->
|
864
|
-
# Returns URL-escaped string.
|
873
|
+
# Returns URL-escaped string (`application/x-www-form-urlencoded`).
|
865
874
|
#
|
866
875
|
def escape: (string str) -> String
|
867
876
|
|
@@ -877,7 +886,7 @@ class CGI
|
|
877
886
|
# rdoc-file=ext/cgi/escape/escape.c
|
878
887
|
# - CGI.unescape(string, encoding=@@accept_charset) -> string
|
879
888
|
# -->
|
880
|
-
# Returns URL-unescaped string.
|
889
|
+
# Returns URL-unescaped string (`application/x-www-form-urlencoded`).
|
881
890
|
#
|
882
891
|
def unescape: (string str, ?encoding encoding) -> String
|
883
892
|
|