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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dc7a972ca885618f8bcb3beb35d5096ddd9cc3dc6880fb6ae6b06d4a1845be0
4
- data.tar.gz: 3fd84cf6a4869385f16e98cb1319855fcc1fcc242e16731b6bbdd5d249f1df8a
3
+ metadata.gz: e9764851079fa89592891f71a26c6eee69864530b07b78e11095b5fdd49b3f6e
4
+ data.tar.gz: 4fa3989f4f1508aff037e9f07d708f8b14355d133415c088ae8a61abec5ad114
5
5
  SHA512:
6
- metadata.gz: 0b79dcac9fa9f94eff95b2c098208784f45e8ee891b94202f8e82886d15e0af04bbb26acdff5428277470536cfef164f79b5a1f73ded288b320600bd15568500
7
- data.tar.gz: c0c6f53213e0b0aac09747c2aef470548b2b872b8ace2647ebdedca292a55b8aa0dbbebfa5c3ff75c47d3f76e87643f23f75883cacc49726fd778f95e1c3ee9e
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
@@ -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
@@ -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
@@ -1267,7 +1267,7 @@ module RBS
1267
1267
  return_type.has_classish_type?
1268
1268
  end
1269
1269
 
1270
- def with_nonreturn_void
1270
+ def with_nonreturn_void?
1271
1271
  false
1272
1272
  end
1273
1273
 
data/lib/rbs/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RBS
4
- VERSION = "3.5.1"
4
+ VERSION = "3.5.2"
5
5
  end
@@ -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+) /) # -> "Fri Dec 12 "
188
- # s.captures # -> ["Fri", "Dec", "12"]
189
- # s.scan(/(\w+) (\w+) (\d+) /) # -> nil
190
- # s.captures # -> nil
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.1
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-06-07 00:00:00.000000000 Z
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.3
530
+ rubygems_version: 3.5.11
531
531
  signing_key:
532
532
  specification_version: 4
533
533
  summary: Type signature for Ruby.