rbs 3.5.1.pre.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: 15842c05830277f680d570af8724cfe962c63c1188e125b899904d43633a013c
4
- data.tar.gz: 4676d5718267865fb19c432a15769c1b8a0f1ca41efc28da0be3fec59abc8fc7
3
+ metadata.gz: e9764851079fa89592891f71a26c6eee69864530b07b78e11095b5fdd49b3f6e
4
+ data.tar.gz: 4fa3989f4f1508aff037e9f07d708f8b14355d133415c088ae8a61abec5ad114
5
5
  SHA512:
6
- metadata.gz: 2d23e68eb43cdc67695fb289a052c0580be90859211fca4580497dea2ad9a88ad76730a74c054d54ccfd0805a3b49032db611af1c66739f36b6ea2b1a82e7bc0
7
- data.tar.gz: a0f1246404e79a4b7e49f56d460edc57271846249ee5fc0548525727e4850f2c0cdd733e06a5034ddff4af3f1ea0e226880efe68f4000f19406073365f87a8fc
6
+ metadata.gz: 95b8dd11d46e7d395bb72fe698e6607eea742d02b1fe78309b030f3e921be8400367abf8ce3985b9afa35febb596fb196d532a420d641f1d6cf1bab78fdfdf38
7
+ data.tar.gz: bf4153dcdbf740345ed312a75a6452475d1faeb92f5fa7f07d5c0f153582be935c4952aa3ed53dc20f579da0d2ed219f80cda826c575c416d34bb3a9c5ff98d8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
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
+
15
+ ## 3.5.1 (2024-06-07)
16
+
17
+ ### Library changes
18
+
19
+ * Add explicit dependency on the `logger` gem ([#1865](https://github.com/ruby/rbs/pull/1865))
20
+ * Make c99, c23 compatible ([#1870](https://github.com/ruby/rbs/pull/1870))
21
+
22
+ ### Miscellaneous
23
+
24
+ * Don't try to sign git commits when running tests ([#1867](https://github.com/ruby/rbs/pull/1867))
25
+
3
26
  ## 3.5.0 (2024-06-06)
4
27
 
5
28
  ### Signature updates
@@ -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.pre.1"
4
+ VERSION = "3.5.2"
5
5
  end
data/rbs.gemspec CHANGED
@@ -41,4 +41,5 @@ Gem::Specification.new do |spec|
41
41
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
42
42
  spec.require_paths = ["lib"]
43
43
  spec.required_ruby_version = ">= 3.0"
44
+ spec.add_dependency "logger"
44
45
  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,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1.pre.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
12
- dependencies: []
11
+ date: 2024-07-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logger
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: RBS is the language for type signatures for Ruby and standard library
14
28
  definitions.
15
29
  email:
@@ -513,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
513
527
  - !ruby/object:Gem::Version
514
528
  version: '0'
515
529
  requirements: []
516
- rubygems_version: 3.5.3
530
+ rubygems_version: 3.5.11
517
531
  signing_key:
518
532
  specification_version: 4
519
533
  summary: Type signature for Ruby.