rbs 3.5.1 → 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/core/rubygems/errors.rbs +66 -0
- data/core/rubygems/rubygems.rbs +66 -0
- data/core/string.rbs +4 -0
- data/lib/rbs/types.rb +1 -1
- data/lib/rbs/version.rb +1 -1
- data/stdlib/strscan/0/string_scanner.rbs +4 -4
- 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: e9764851079fa89592891f71a26c6eee69864530b07b78e11095b5fdd49b3f6e
|
4
|
+
data.tar.gz: 4fa3989f4f1508aff037e9f07d708f8b14355d133415c088ae8a61abec5ad114
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95b8dd11d46e7d395bb72fe698e6607eea742d02b1fe78309b030f3e921be8400367abf8ce3985b9afa35febb596fb196d532a420d641f1d6cf1bab78fdfdf38
|
7
|
+
data.tar.gz: bf4153dcdbf740345ed312a75a6452475d1faeb92f5fa7f07d5c0f153582be935c4952aa3ed53dc20f579da0d2ed219f80cda826c575c416d34bb3a9c5ff98d8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.5.2 (2024-07-10)
|
4
|
+
|
5
|
+
### Library changes
|
6
|
+
|
7
|
+
* Update docs for ruby-3.3.4 ([#1923](https://github.com/ruby/rbs/pull/1923), Backported in [#1925](https://github.com/ruby/rbs/pull/1925))
|
8
|
+
* Update docs for ruby-3.3.3 ([#1889](https://github.com/ruby/rbs/pull/1889), Backported in [#1925](https://github.com/ruby/rbs/pull/1925))
|
9
|
+
* Fix #1905: Fix typo in `UntypedFunction` ([#1906](https://github.com/ruby/rbs/pull/1906), Backported in [#1925](https://github.com/ruby/rbs/pull/1925))
|
10
|
+
|
11
|
+
### Miscellaneous
|
12
|
+
|
13
|
+
* Use `File.open` instead of `IO.sysopen` ([#1913](https://github.com/ruby/rbs/pull/1913))
|
14
|
+
|
3
15
|
## 3.5.1 (2024-06-07)
|
4
16
|
|
5
17
|
### Library changes
|
data/core/rubygems/errors.rbs
CHANGED
@@ -94,6 +94,72 @@
|
|
94
94
|
#
|
95
95
|
# -The RubyGems Team
|
96
96
|
#
|
97
|
+
# <!-- rdoc-file=lib/rubygems/deprecate.rb -->
|
98
|
+
# Provides 3 methods for declaring when something is going away.
|
99
|
+
#
|
100
|
+
# +deprecate(name, repl, year, month)+:
|
101
|
+
# Indicate something may be removed on/after a certain date.
|
102
|
+
#
|
103
|
+
# +rubygems_deprecate(name, replacement=:none)+:
|
104
|
+
# Indicate something will be removed in the next major RubyGems version,
|
105
|
+
# and (optionally) a replacement for it.
|
106
|
+
#
|
107
|
+
# `rubygems_deprecate_command`:
|
108
|
+
# Indicate a RubyGems command (in +lib/rubygems/commands/*.rb+) will be
|
109
|
+
# removed in the next RubyGems version.
|
110
|
+
#
|
111
|
+
# Also provides `skip_during` for temporarily turning off deprecation warnings.
|
112
|
+
# This is intended to be used in the test suite, so deprecation warnings don't
|
113
|
+
# cause test failures if you need to make sure stderr is otherwise empty.
|
114
|
+
#
|
115
|
+
# Example usage of `deprecate` and `rubygems_deprecate`:
|
116
|
+
#
|
117
|
+
# class Legacy
|
118
|
+
# def self.some_class_method
|
119
|
+
# # ...
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# def some_instance_method
|
123
|
+
# # ...
|
124
|
+
# end
|
125
|
+
#
|
126
|
+
# def some_old_method
|
127
|
+
# # ...
|
128
|
+
# end
|
129
|
+
#
|
130
|
+
# extend Gem::Deprecate
|
131
|
+
# deprecate :some_instance_method, "X.z", 2011, 4
|
132
|
+
# rubygems_deprecate :some_old_method, "Modern#some_new_method"
|
133
|
+
#
|
134
|
+
# class << self
|
135
|
+
# extend Gem::Deprecate
|
136
|
+
# deprecate :some_class_method, :none, 2011, 4
|
137
|
+
# end
|
138
|
+
# end
|
139
|
+
#
|
140
|
+
# Example usage of `rubygems_deprecate_command`:
|
141
|
+
#
|
142
|
+
# class Gem::Commands::QueryCommand < Gem::Command
|
143
|
+
# extend Gem::Deprecate
|
144
|
+
# rubygems_deprecate_command
|
145
|
+
#
|
146
|
+
# # ...
|
147
|
+
# end
|
148
|
+
#
|
149
|
+
# Example usage of `skip_during`:
|
150
|
+
#
|
151
|
+
# class TestSomething < Gem::Testcase
|
152
|
+
# def test_some_thing_with_deprecations
|
153
|
+
# Gem::Deprecate.skip_during do
|
154
|
+
# actual_stdout, actual_stderr = capture_output do
|
155
|
+
# Gem.something_deprecated
|
156
|
+
# end
|
157
|
+
# assert_empty actual_stdout
|
158
|
+
# assert_equal(expected, actual_stderr)
|
159
|
+
# end
|
160
|
+
# end
|
161
|
+
# end
|
162
|
+
#
|
97
163
|
module Gem
|
98
164
|
# <!-- rdoc-file=lib/rubygems/errors.rb -->
|
99
165
|
# Raised when RubyGems is unable to load or activate a gem. Contains the name
|
data/core/rubygems/rubygems.rbs
CHANGED
@@ -94,6 +94,72 @@
|
|
94
94
|
#
|
95
95
|
# -The RubyGems Team
|
96
96
|
#
|
97
|
+
# <!-- rdoc-file=lib/rubygems/deprecate.rb -->
|
98
|
+
# Provides 3 methods for declaring when something is going away.
|
99
|
+
#
|
100
|
+
# +deprecate(name, repl, year, month)+:
|
101
|
+
# Indicate something may be removed on/after a certain date.
|
102
|
+
#
|
103
|
+
# +rubygems_deprecate(name, replacement=:none)+:
|
104
|
+
# Indicate something will be removed in the next major RubyGems version,
|
105
|
+
# and (optionally) a replacement for it.
|
106
|
+
#
|
107
|
+
# `rubygems_deprecate_command`:
|
108
|
+
# Indicate a RubyGems command (in +lib/rubygems/commands/*.rb+) will be
|
109
|
+
# removed in the next RubyGems version.
|
110
|
+
#
|
111
|
+
# Also provides `skip_during` for temporarily turning off deprecation warnings.
|
112
|
+
# This is intended to be used in the test suite, so deprecation warnings don't
|
113
|
+
# cause test failures if you need to make sure stderr is otherwise empty.
|
114
|
+
#
|
115
|
+
# Example usage of `deprecate` and `rubygems_deprecate`:
|
116
|
+
#
|
117
|
+
# class Legacy
|
118
|
+
# def self.some_class_method
|
119
|
+
# # ...
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# def some_instance_method
|
123
|
+
# # ...
|
124
|
+
# end
|
125
|
+
#
|
126
|
+
# def some_old_method
|
127
|
+
# # ...
|
128
|
+
# end
|
129
|
+
#
|
130
|
+
# extend Gem::Deprecate
|
131
|
+
# deprecate :some_instance_method, "X.z", 2011, 4
|
132
|
+
# rubygems_deprecate :some_old_method, "Modern#some_new_method"
|
133
|
+
#
|
134
|
+
# class << self
|
135
|
+
# extend Gem::Deprecate
|
136
|
+
# deprecate :some_class_method, :none, 2011, 4
|
137
|
+
# end
|
138
|
+
# end
|
139
|
+
#
|
140
|
+
# Example usage of `rubygems_deprecate_command`:
|
141
|
+
#
|
142
|
+
# class Gem::Commands::QueryCommand < Gem::Command
|
143
|
+
# extend Gem::Deprecate
|
144
|
+
# rubygems_deprecate_command
|
145
|
+
#
|
146
|
+
# # ...
|
147
|
+
# end
|
148
|
+
#
|
149
|
+
# Example usage of `skip_during`:
|
150
|
+
#
|
151
|
+
# class TestSomething < Gem::Testcase
|
152
|
+
# def test_some_thing_with_deprecations
|
153
|
+
# Gem::Deprecate.skip_during do
|
154
|
+
# actual_stdout, actual_stderr = capture_output do
|
155
|
+
# Gem.something_deprecated
|
156
|
+
# end
|
157
|
+
# assert_empty actual_stdout
|
158
|
+
# assert_equal(expected, actual_stderr)
|
159
|
+
# end
|
160
|
+
# end
|
161
|
+
# end
|
162
|
+
#
|
97
163
|
module Gem
|
98
164
|
interface _HashLike[K, V]
|
99
165
|
def each_pair: () { ([ K, V ]) -> untyped } -> self
|
data/core/string.rbs
CHANGED
@@ -699,6 +699,10 @@ class String
|
|
699
699
|
# String.new(capacity: 1)
|
700
700
|
# String.new('foo', capacity: 4096)
|
701
701
|
#
|
702
|
+
# Note that Ruby strings are null-terminated internally, so the internal buffer
|
703
|
+
# size will be one or more bytes larger than the requested capacity depending on
|
704
|
+
# the encoding.
|
705
|
+
#
|
702
706
|
# The `string`, `encoding`, and `capacity` arguments may all be used together:
|
703
707
|
#
|
704
708
|
# String.new('hello', encoding: 'UTF-8', capacity: 25)
|
data/lib/rbs/types.rb
CHANGED
data/lib/rbs/version.rb
CHANGED
@@ -184,10 +184,10 @@ class StringScanner
|
|
184
184
|
# If nothing was priorly matched, it returns nil.
|
185
185
|
#
|
186
186
|
# s = StringScanner.new("Fri Dec 12 1975 14:39")
|
187
|
-
# s.scan(/(\w+) (\w+) (\d+)
|
188
|
-
# s.captures
|
189
|
-
# s.scan(/(\w+) (\w+) (\d+)
|
190
|
-
# s.captures
|
187
|
+
# s.scan(/(\w+) (\w+) (\d+) (1980)?/) # -> "Fri Dec 12 "
|
188
|
+
# s.captures # -> ["Fri", "Dec", "12", nil]
|
189
|
+
# s.scan(/(\w+) (\w+) (\d+) (1980)?/) # -> nil
|
190
|
+
# s.captures # -> nil
|
191
191
|
#
|
192
192
|
def captures: () -> Array[String]?
|
193
193
|
|
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.5.
|
4
|
+
version: 3.5.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-
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logger
|
@@ -527,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
527
527
|
- !ruby/object:Gem::Version
|
528
528
|
version: '0'
|
529
529
|
requirements: []
|
530
|
-
rubygems_version: 3.5.
|
530
|
+
rubygems_version: 3.5.11
|
531
531
|
signing_key:
|
532
532
|
specification_version: 4
|
533
533
|
summary: Type signature for Ruby.
|