rbs 4.2.0.pre.1-java → 4.2.1.pre.1-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 554551900ed013726189cd8d6c344ca71e86de6802f147f16cc10fd23cbb974d
4
- data.tar.gz: 8bfe02ab9d5bd48a44d946df83bb92663891231d6fa6d7dc22ff8e02f31ee812
3
+ metadata.gz: 52c31de75feda74f79fbc00b274f862111ec61eb15e8c70183942406d9025bcc
4
+ data.tar.gz: 41be380835966adb5b1bf76b993a426260f2c09b8026bd9cbad78b954098816d
5
5
  SHA512:
6
- metadata.gz: 27ef11ef0c86d37182618520a0fef8ac771ebb76e66c7d245a1205c2e7656cbb21fdb9b45e11ae8a575cdb4ea06fba279573f9bd24b47a09fde0841d283429ca
7
- data.tar.gz: efdb24efaacad04560ee60d75fcb9443f5465d283aedc435a1bc501776364e370c9011fc401d5f327a01411554ad6e799141156d14fd968527626aa137b1d3cc
6
+ metadata.gz: d0cb5671a1221bf957f8a885f8c44dffada2020e891cbea32761117e606bf221248e6f83a9401fc500a40e238b57ca330fb73d00b8b92545094bdd0a07ed1f67
7
+ data.tar.gz: 63ad82485d14e6075038ca7538b40aff33b36295bd6ddef1cf722291b0f364a89960443d5acf780da13c5c18c026e4b3a78693fd8a30c9d6626b84832c5660c3
data/.rubocop.yml CHANGED
@@ -3,7 +3,6 @@ plugins:
3
3
  - rubocop-on-rbs
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 3.4
7
6
  DisabledByDefault: true
8
7
  Exclude:
9
8
  - 'vendor/bundle/**/*'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,42 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 4.2.0.pre.1 (2026-08-18)
3
+ ## 4.2.1.pre.1 (2026-08-26)
4
+
5
+ ### Library changes
6
+
7
+ * Remove some obsolete ruby version guards ([#3100](https://github.com/ruby/rbs/pull/3100))
8
+
9
+ #### rbs collection
10
+
11
+ * Make `rbs collection` say where the gem list comes from ([#3094](https://github.com/ruby/rbs/pull/3094))
12
+
13
+ ### Miscellaneous
14
+
15
+ * Run `bundle` with the Ruby running the tests ([#3099](https://github.com/ruby/rbs/pull/3099))
16
+ * docs: fix typo prefered -> preferred ([#3098](https://github.com/ruby/rbs/pull/3098))
17
+
18
+ ## 4.2.0 (2026-08-23)
19
+
20
+ RBS 4.2 accepts non-ASCII characters in identifiers. Method names, instance variable names and parameter names can be written in any script, and other names may contain non-ASCII characters as long as they start with an ASCII letter, which is what tells a constant from a method name.
21
+
22
+ ```rbs
23
+ class Greeter
24
+ @挨拶: String
25
+
26
+ def こんにちは: () -> String
27
+ end
28
+ ```
29
+
30
+ The parser and the AST support Ruby-style `...` forwarding parameters in method types, but the layers built on top of the parser do not yet. The syntax is disabled by default in 4.2 and is not enabled by the public `RBS::Parser` API, so it cannot be used in regular RBS signatures yet.
31
+
32
+ Ruby 3.2 reached EOL on 2026-04-01, and this release requires Ruby 3.3 or later. Applications on 3.2 stay on the 4.1 line.
33
+
34
+ ### Signature updates
35
+
36
+ **Updated classes/modules/methods:** `ERB`, `ERB::DefMethod`, `IO`, `Monitor`, `MonitorMixin::ConditionVariable`, `Singleton`, `StringIO`, `Zlib::GzipFile`, `Zlib::GzipWriter`
37
+
38
+ * Replace deterministic `untyped` return types with concrete types ([#2966](https://github.com/ruby/rbs/pull/2966))
39
+ * Declare Singleton::SingletonInstanceMethods ([#3037](https://github.com/ruby/rbs/pull/3037))
4
40
 
5
41
  ### Language updates
6
42
 
@@ -10,6 +46,7 @@
10
46
 
11
47
  ### Library changes
12
48
 
49
+ * Drop runtime support for Ruby 3.2 ([#3095](https://github.com/ruby/rbs/pull/3095))
13
50
  * Stop the lexer reading past the end of a byte_range ([#3040](https://github.com/ruby/rbs/pull/3040))
14
51
  * Exclude CR from comment tokens to fix an off-by-one Location#end_line on CRLF files ([#3069](https://github.com/ruby/rbs/pull/3069))
15
52
  * Handle the NULL parser in the WebAssembly shim ([#3085](https://github.com/ruby/rbs/pull/3085))
@@ -24,6 +61,7 @@
24
61
 
25
62
  ### Miscellaneous
26
63
 
64
+ * Omit forwarding parameter tests on JRuby ([#3092](https://github.com/ruby/rbs/pull/3092))
27
65
  * Skip JSON 2-only tests with JSON 3 ([#3084](https://github.com/ruby/rbs/pull/3084))
28
66
  * Pin GitHub Actions to commit hashes ([#3020](https://github.com/ruby/rbs/pull/3020))
29
67
 
data/core/io.rbs CHANGED
@@ -1417,7 +1417,8 @@ class IO < Object
1417
1417
  #
1418
1418
  # AA
1419
1419
  #
1420
- def putc: (Numeric | String object) -> (Numeric | String)
1420
+ def putc: (real) -> real
1421
+ | (String) -> String
1421
1422
 
1422
1423
  # <!--
1423
1424
  # rdoc-file=io.c
data/docs/collection.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  `rbs collection` sub command manages third party gems' RBS. In short, it is `bundler` for RBS.
4
4
 
5
+ ## Quickstart
6
+
7
+ In a project that has a `Gemfile.lock`:
8
+
9
+ ```console
10
+ $ rbs collection init
11
+ $ rbs collection install
12
+ ```
13
+
14
+ `rbs collection` reads `Gemfile.lock`, so there is no list of dependencies to maintain. `rbs` and type checkers such as Steep load the installed RBS files automatically.
15
+
5
16
  ## Requirements
6
17
 
7
18
  * `git(1)`
@@ -17,33 +28,44 @@ First, generate the configuration file, `rbs_collection.yaml`, with `rbs collect
17
28
  $ rbs collection init
18
29
  created: rbs_collection.yaml
19
30
 
31
+ rbs collection installs RBS files for the gems in your Gemfile.lock.
32
+ Gems in Gemfile.lock don't need to be listed anywhere.
33
+
34
+ Next steps:
35
+ $ echo "/.gem_rbs_collection/" >> .gitignore
36
+ $ rbs collection install # writes rbs_collection.lock.yaml; keep it in version control
37
+
20
38
  $ cat rbs_collection.yaml
39
+ # rbs collection installs RBS files for the gems in your Gemfile.lock.
40
+ # Run `rbs collection install` to resolve them into rbs_collection.lock.yaml and install them.
41
+
21
42
  # Download sources
22
43
  sources:
23
- - name: ruby/gem_rbs_collection
44
+ - type: git
45
+ name: ruby/gem_rbs_collection
24
46
  remote: https://github.com/ruby/gem_rbs_collection.git
25
47
  revision: main
26
48
  repo_dir: gems
27
49
 
50
+ # You can specify local directories as sources also.
51
+ # - type: local
52
+ # path: path/to/your/local/repository
53
+
28
54
  # A directory to install the downloaded RBSs
29
55
  path: .gem_rbs_collection
30
56
 
31
57
  # gems:
58
+ # # RBS for a library that doesn't appear in Gemfile.lock, such as a non-gem standard library.
59
+ # - name: socket
60
+ #
32
61
  # # If you want to avoid installing rbs files for gems, you can specify them here.
33
62
  # - name: GEM_NAME
34
63
  # ignore: true
35
64
  ```
36
65
 
37
- I also recommend updating `.gitignore`.
38
-
39
- ```console
40
- $ echo /.gem_rbs_collection/ >> .gitignore
41
- ```
42
-
43
66
  ### Install dependencies
44
67
 
45
68
  Then, install gems' RBS with `rbs collection install`! It copies RBS from [the gem RBS repository](https://github.com/ruby/gem_rbs_collection) to `.gem_rbs_collection/` directory by default.
46
- I recommend to ignore `.gem_rbs_collection/` from version control system, such as Git.
47
69
 
48
70
  ```console
49
71
  $ rbs collection install
@@ -86,9 +108,9 @@ sources:
86
108
  path: .gem_rbs_collection
87
109
 
88
110
  gems:
89
- # If the Gemfile.lock doesn't contain csv gem but you use csv gem,
90
- # you can write the gem name explicitly to install RBS of the gem.
91
- - name: csv
111
+ # If the Gemfile.lock doesn't contain socket but you use it,
112
+ # you can write the library name explicitly to install RBS of the library.
113
+ - name: socket
92
114
 
93
115
  # If the Gemfile.lock contains nokogiri gem but you don't want to use the RBS,
94
116
  # you can ignore the gem.
@@ -48,7 +48,7 @@ class Measure < Data.define(:amount, :unit)
48
48
  end
49
49
  ```
50
50
 
51
- @soutaro has prefered inheriting from `Data.define`, but you may find an extra annonymous class in `.ancestors` [^1].
51
+ @soutaro has preferred inheriting from `Data.define`, but you may find an extra annonymous class in `.ancestors` [^1].
52
52
 
53
53
  ```ruby
54
54
  Measure.ancestors #=> [Measure, #<Class:0xOOF>, Data, ...]
data/lib/rbs/cli.rb CHANGED
@@ -1089,21 +1089,37 @@ EOB
1089
1089
 
1090
1090
  case args[0]
1091
1091
  when 'install', 'instal', 'insta', 'inst', 'ins', 'in', 'i'
1092
- unless params[:frozen]
1093
- Collection::Config.generate_lockfile(config_path: config_path, definition: Bundler.definition)
1092
+ if params[:frozen]
1093
+ unless lock_path.exist?
1094
+ if config_path.exist?
1095
+ stderr.puts "#{lock_path} not found. Run `rbs collection install` without `--frozen` to generate it."
1096
+ else
1097
+ stderr.puts "#{lock_path} not found. Run `rbs collection init` and `rbs collection install` to generate it."
1098
+ end
1099
+ return 1
1100
+ end
1101
+ else
1102
+ return 1 unless collection_config_available?(config_path)
1103
+ definition = bundler_definition or return 1
1104
+ Collection::Config.generate_lockfile(config_path: config_path, definition: definition)
1094
1105
  end
1095
1106
  Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
1096
1107
  when 'update', 'updat', 'upda', 'upd', 'up', 'u'
1108
+ return 1 unless collection_config_available?(config_path)
1109
+ definition = bundler_definition or return 1
1097
1110
  # TODO: Be aware of argv to update only specified gem
1098
- Collection::Config.generate_lockfile(config_path: config_path, definition: Bundler.definition, with_lockfile: false)
1111
+ Collection::Config.generate_lockfile(config_path: config_path, definition: definition, with_lockfile: false)
1099
1112
  Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
1100
1113
  when 'init'
1101
1114
  if config_path.exist?
1102
- puts "#{config_path} already exists"
1115
+ stderr.puts "#{config_path} already exists"
1103
1116
  return 1
1104
1117
  end
1105
1118
 
1106
1119
  config_path.write(<<~'YAML')
1120
+ # rbs collection installs RBS files for the gems in your Gemfile.lock.
1121
+ # Run `rbs collection install` to resolve them into rbs_collection.lock.yaml and install them.
1122
+
1107
1123
  # Download sources
1108
1124
  sources:
1109
1125
  - type: git
@@ -1120,27 +1136,57 @@ EOB
1120
1136
  path: .gem_rbs_collection
1121
1137
 
1122
1138
  # gems:
1139
+ # # RBS for a library that doesn't appear in Gemfile.lock, such as a non-gem standard library.
1140
+ # - name: socket
1141
+ #
1123
1142
  # # If you want to avoid installing rbs files for gems, you can specify them here.
1124
1143
  # - name: GEM_NAME
1125
1144
  # ignore: true
1126
1145
  YAML
1127
- stdout.puts "created: #{config_path}"
1146
+ stdout.puts <<~MESSAGE
1147
+ created: #{config_path}
1148
+
1149
+ rbs collection installs RBS files for the gems in your Gemfile.lock.
1150
+ Gems in Gemfile.lock don't need to be listed anywhere.
1151
+
1152
+ Next steps:
1153
+ $ echo "/.gem_rbs_collection/" >> .gitignore
1154
+ $ rbs collection install # writes rbs_collection.lock.yaml; keep it in version control
1155
+ MESSAGE
1128
1156
  when 'clean'
1129
1157
  unless lock_path.exist?
1130
- puts "#{lock_path} should exist to clean"
1158
+ stderr.puts "#{lock_path} should exist to clean"
1131
1159
  return 1
1132
1160
  end
1133
1161
  Collection::Cleaner.new(lockfile_path: lock_path)
1134
1162
  when 'help', 'hel', 'he', 'h'
1135
- puts opts.help
1163
+ stdout.puts opts.help
1136
1164
  else
1137
- puts opts.help
1165
+ stdout.puts opts.help
1138
1166
  return 1
1139
1167
  end
1140
1168
 
1141
1169
  0
1142
1170
  end
1143
1171
 
1172
+ def collection_config_available?(config_path)
1173
+ return true if config_path.exist?
1174
+
1175
+ stderr.puts "#{config_path} not found. Run `rbs collection init` to generate it."
1176
+ false
1177
+ end
1178
+
1179
+ def bundler_definition
1180
+ definition = Bundler.definition
1181
+ return definition if definition.lockfile.file?
1182
+
1183
+ stderr.puts "#{definition.lockfile} not found. Run `bundle install` to generate it."
1184
+ nil
1185
+ rescue Bundler::GemfileNotFound
1186
+ stderr.puts "Gemfile not found. `rbs collection` reads the gems to install from Gemfile.lock."
1187
+ nil
1188
+ end
1189
+
1144
1190
  def collection_options(args)
1145
1191
  OptionParser.new do |opts|
1146
1192
  opts.banner = <<~HELP
@@ -5,58 +5,25 @@ module RBS
5
5
  module Helpers
6
6
  private
7
7
 
8
- # Prism can't parse Ruby 3.2 code
9
- if RUBY_VERSION >= "3.3"
10
- def parse_comments(string, include_trailing:)
11
- Prism.parse_comments(string, version: "current").yield_self do |prism_comments| # steep:ignore UnexpectedKeywordArgument
12
- prism_comments.each_with_object({}) do |comment, hash| #$ Hash[Integer, AST::Comment]
13
- # Skip EmbDoc comments
14
- next unless comment.is_a?(Prism::InlineComment)
15
- # skip like `module Foo # :nodoc:`
16
- next if comment.trailing? && !include_trailing
17
-
18
- line = comment.location.start_line
19
- body = "#{comment.location.slice}\n"
20
- body = body[2..-1] or raise
21
- body = "\n" if body.empty?
22
-
23
- comment = AST::Comment.new(string: body, location: nil)
24
- if prev_comment = hash.delete(line - 1)
25
- hash[line] = AST::Comment.new(string: prev_comment.string + comment.string,
26
- location: nil)
27
- else
28
- hash[line] = comment
29
- end
30
- end
31
- end
32
- end
33
- else
34
- require "ripper"
35
- def parse_comments(string, include_trailing:)
36
- Ripper.lex(string).yield_self do |tokens|
37
- code_lines = {} #: Hash[Integer, bool]
38
- tokens.each.with_object({}) do |token, hash| #$ Hash[Integer, AST::Comment]
39
- case token[1]
40
- when :on_sp, :on_ignored_nl
41
- # skip
42
- when :on_comment
43
- line = token[0][0]
44
- # skip like `module Foo # :nodoc:`
45
- next if code_lines[line] && !include_trailing
46
- body = token[2][2..-1] or raise
47
-
48
- body = "\n" if body.empty?
49
-
50
- comment = AST::Comment.new(string: body, location: nil)
51
- if prev_comment = hash.delete(line - 1)
52
- hash[line] = AST::Comment.new(string: prev_comment.string + comment.string,
53
- location: nil)
54
- else
55
- hash[line] = comment
56
- end
57
- else
58
- code_lines[token[0][0]] = true
59
- end
8
+ def parse_comments(string, include_trailing:)
9
+ Prism.parse_comments(string, version: "current").yield_self do |prism_comments| # steep:ignore UnexpectedKeywordArgument
10
+ prism_comments.each_with_object({}) do |comment, hash| #$ Hash[Integer, AST::Comment]
11
+ # Skip EmbDoc comments
12
+ next unless comment.is_a?(Prism::InlineComment)
13
+ # skip like `module Foo # :nodoc:`
14
+ next if comment.trailing? && !include_trailing
15
+
16
+ line = comment.location.start_line
17
+ body = "#{comment.location.slice}\n"
18
+ body = body[2..-1] or raise
19
+ body = "\n" if body.empty?
20
+
21
+ comment = AST::Comment.new(string: body, location: nil)
22
+ if prev_comment = hash.delete(line - 1)
23
+ hash[line] = AST::Comment.new(string: prev_comment.string + comment.string,
24
+ location: nil)
25
+ else
26
+ hash[line] = comment
60
27
  end
61
28
  end
62
29
  end
@@ -99,8 +99,6 @@ module RBS
99
99
 
100
100
  private
101
101
 
102
- CAN_CALL_KEYWORD_INIT_P = Struct.new(:tmp).respond_to?(:keyword_init?)
103
-
104
102
  def build_super_class
105
103
  AST::Declarations::Class::Super.new(name: TypeName.parse("::Struct"), args: [untyped], location: nil)
106
104
  end
@@ -118,21 +116,16 @@ module RBS
118
116
  [:new, :[]].map do |name|
119
117
  new_overloads = [] #: Array[AST::Members::MethodDefinition::Overload]
120
118
 
121
- if CAN_CALL_KEYWORD_INIT_P
122
- case @target_class.keyword_init?
123
- when false
124
- new_overloads << build_overload_for_positional_arguments
125
- when true
126
- new_overloads << build_overload_for_keyword_arguments
127
- when nil
128
- new_overloads << build_overload_for_positional_arguments
129
- new_overloads << build_overload_for_keyword_arguments
130
- else
131
- raise
132
- end
133
- else
119
+ case @target_class.keyword_init?
120
+ when false
121
+ new_overloads << build_overload_for_positional_arguments
122
+ when true
123
+ new_overloads << build_overload_for_keyword_arguments
124
+ when nil
134
125
  new_overloads << build_overload_for_positional_arguments
135
126
  new_overloads << build_overload_for_keyword_arguments
127
+ else
128
+ raise
136
129
  end
137
130
 
138
131
  AST::Members::MethodDefinition.new(
@@ -178,8 +171,6 @@ module RBS
178
171
 
179
172
  # def self.keyword_init?: () -> bool?
180
173
  def build_s_keyword_init_p
181
- return [] unless CAN_CALL_KEYWORD_INIT_P
182
-
183
174
  return_type = @target_class.keyword_init?.nil? \
184
175
  ? Types::Bases::Nil.new(location: nil)
185
176
  : Types::Literal.new(literal: @target_class.keyword_init?, location: nil)
@@ -212,7 +203,6 @@ module RBS
212
203
 
213
204
  class DataGenerator < ValueObjectBase
214
205
  def self.generatable?(target)
215
- return false unless RUBY_VERSION >= '3.2'
216
206
  return false unless target < Data
217
207
  # Avoid direct inherited class like `class Option < Data`
218
208
  return false unless target.respond_to?(:members)
@@ -527,7 +527,7 @@ module RBS
527
527
 
528
528
  generate_mixin(mod, decl, type_name, type_name_absolute)
529
529
 
530
- unless mod < Struct || (RUBY_VERSION >= '3.2' && mod < Data)
530
+ unless mod < Struct || mod < Data
531
531
  generate_methods(mod, type_name, decl.members) unless outline
532
532
  end
533
533
 
data/lib/rbs/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RBS
4
- VERSION = "4.2.0.pre.1"
4
+ VERSION = "4.2.1.pre.1"
5
5
  end
data/rbs.gemspec CHANGED
@@ -67,14 +67,10 @@ Gem::Specification.new do |spec|
67
67
  spec.extensions = %w{ext/rbs_extension/extconf.rb}
68
68
  end
69
69
 
70
- if false
71
- spec.required_ruby_version = ">= 3.4"
72
- end
73
-
74
70
  spec.bindir = "exe"
75
71
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
76
72
  spec.require_paths = ["lib"]
77
- spec.required_ruby_version = ">= 3.2"
73
+ spec.required_ruby_version = ">= 3.3"
78
74
  spec.add_dependency "logger"
79
75
  spec.add_dependency "prism", ">= 1.6.0"
80
76
  spec.add_dependency "tsort"
data/sig/cli.rbs CHANGED
@@ -76,6 +76,12 @@ module RBS
76
76
 
77
77
  def run_collection: (Array[String], LibraryOptions) -> Integer
78
78
 
79
+ # Returns `true` if the collection config exists, otherwise prints a message to `stderr` and returns `false`
80
+ def collection_config_available?: (Pathname) -> bool
81
+
82
+ # Returns `nil` if `Gemfile` or `Gemfile.lock` is not found, after printing a message to `stderr`
83
+ def bundler_definition: () -> Bundler::Definition?
84
+
79
85
  def run_annotate: (Array[String], top) -> Integer
80
86
 
81
87
  def run_subtract: (Array[String], top) -> Integer
@@ -64,8 +64,6 @@ module RBS
64
64
  def build_s_new: () -> Array[AST::Members::MethodDefinition]
65
65
 
66
66
  def build_super_class: () -> AST::Declarations::Class::Super
67
-
68
- CAN_CALL_KEYWORD_INIT_P: bool
69
67
  end
70
68
 
71
69
  class DataGenerator < ValueObjectBase
@@ -1,4 +1,7 @@
1
1
  module Bundler
2
+ class GemfileNotFound < StandardError
3
+ end
4
+
2
5
  class LockfileParser
3
6
  def initialize: (String) -> void
4
7
 
data/stdlib/erb/0/erb.rbs CHANGED
@@ -619,7 +619,7 @@ class ERB
619
619
  # It's good practice to choose a variable name that begins with an underscore:
620
620
  # <code>'_'</code>.
621
621
  #
622
- def initialize: (String, ?eoutvar: String, ?trim_mode: Integer | String | NilClass) -> untyped
622
+ def initialize: (String, ?eoutvar: String, ?trim_mode: Integer | String | NilClass) -> void
623
623
 
624
624
  # <!-- rdoc-file=lib/erb.rb -->
625
625
  # Returns the Ruby code that, when executed, generates the result;
@@ -702,7 +702,7 @@ class ERB
702
702
  # Like #result, but prints the result string (instead of returning it);
703
703
  # returns `nil`.
704
704
  #
705
- def run: (?Binding) -> untyped
705
+ def run: (?Binding) -> nil
706
706
 
707
707
  # <!--
708
708
  # rdoc-file=lib/erb.rb
@@ -746,7 +746,7 @@ class ERB
746
746
  # class MyClass; include MyModule; end
747
747
  # MyClass.new.render('foo', 123) # => "foo 123"
748
748
  #
749
- def def_method: (Module, String, ?String) -> untyped
749
+ def def_method: (Module, String, ?String) -> Symbol
750
750
 
751
751
  # <!--
752
752
  # rdoc-file=lib/erb.rb
@@ -913,7 +913,7 @@ class ERB
913
913
  # define *methodname* as instance method of current module, using ERB object or
914
914
  # eRuby file
915
915
  #
916
- def self.def_erb_method: (String methodname, (String | ERB) erb_or_fname) -> untyped
916
+ def self.def_erb_method: (String methodname, (String | ERB) erb_or_fname) -> Symbol
917
917
  end
918
918
 
919
919
  # <!-- rdoc-file=lib/erb/util.rb -->
@@ -111,7 +111,7 @@ class Monitor
111
111
  # - wait_for_cond(p1, p2)
112
112
  # -->
113
113
  #
114
- def wait_for_cond: (::MonitorMixin::ConditionVariable, Numeric? timeout) -> untyped
114
+ def wait_for_cond: (::MonitorMixin::ConditionVariable, Numeric? timeout) -> bool
115
115
  end
116
116
 
117
117
  # <!-- rdoc-file=ext/monitor/lib/monitor.rb -->
@@ -334,7 +334,7 @@ class MonitorMixin::ConditionVariable
334
334
  # If `timeout` is given, this method returns after `timeout` seconds passed,
335
335
  # even if no other thread doesn't signal.
336
336
  #
337
- def wait: (?Numeric? timeout) -> untyped
337
+ def wait: (?Numeric? timeout) -> bool
338
338
 
339
339
  # <!--
340
340
  # rdoc-file=ext/monitor/lib/monitor.rb
@@ -342,7 +342,7 @@ class MonitorMixin::ConditionVariable
342
342
  # -->
343
343
  # Calls wait repeatedly until the given block yields a truthy value.
344
344
  #
345
- def wait_until: () { () -> boolish } -> untyped
345
+ def wait_until: () { () -> boolish } -> nil
346
346
 
347
347
  # <!--
348
348
  # rdoc-file=ext/monitor/lib/monitor.rb
@@ -350,7 +350,7 @@ class MonitorMixin::ConditionVariable
350
350
  # -->
351
351
  # Calls wait repeatedly while the given block yields a truthy value.
352
352
  #
353
- def wait_while: () { () -> boolish } -> untyped
353
+ def wait_while: () { () -> boolish } -> nil
354
354
 
355
355
  private
356
356
 
@@ -124,6 +124,9 @@ module Singleton
124
124
  #
125
125
  def dup: () -> bot
126
126
 
127
+ module SingletonInstanceMethods
128
+ end
129
+
127
130
  module SingletonClassMethods
128
131
  end
129
132
  end
@@ -1272,7 +1272,8 @@ class StringIO
1272
1272
  # -->
1273
1273
  # See IO#putc.
1274
1274
  #
1275
- def putc: (Numeric | String arg0) -> untyped
1275
+ def putc: (real) -> real
1276
+ | (String) -> String
1276
1277
 
1277
1278
  def puts: (*untyped arg0) -> nil
1278
1279
 
@@ -143,7 +143,7 @@ module Zlib
143
143
  # `flush` method. While `sync` mode is `true`, the compression ratio decreases
144
144
  # sharply.
145
145
  #
146
- def sync=: (boolish) -> untyped
146
+ def sync=: (boolish) -> boolish
147
147
 
148
148
  # <!--
149
149
  # rdoc-file=ext/zlib/zlib.c
@@ -125,7 +125,8 @@ module Zlib
125
125
  # -->
126
126
  # Same as IO.
127
127
  #
128
- def putc: (Numeric | String arg0) -> untyped
128
+ def putc: (real) -> real
129
+ | (String) -> String
129
130
 
130
131
  # <!--
131
132
  # rdoc-file=ext/zlib/zlib.c
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.pre.1
4
+ version: 4.2.1.pre.1
5
5
  platform: java
6
6
  authors:
7
7
  - Soutaro Matsumoto
@@ -658,7 +658,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
658
658
  requirements:
659
659
  - - ">="
660
660
  - !ruby/object:Gem::Version
661
- version: '3.2'
661
+ version: '3.3'
662
662
  required_rubygems_version: !ruby/object:Gem::Requirement
663
663
  requirements:
664
664
  - - ">="
@@ -667,7 +667,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
667
667
  requirements:
668
668
  - jar com.dylibso.chicory:compiler, 1.7.5
669
669
  - jar com.dylibso.chicory:wasi, 1.7.5
670
- rubygems_version: 4.0.18
670
+ rubygems_version: 4.0.19
671
671
  specification_version: 4
672
672
  summary: Type signature for Ruby.
673
673
  test_files: []