rbs-relaxed 3.9.0.1 → 3.9.4.0

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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +24 -2
  3. data/.github/workflows/typecheck.yml +0 -2
  4. data/.github/workflows/windows.yml +1 -1
  5. data/.rubocop.yml +4 -0
  6. data/CHANGELOG.md +93 -0
  7. data/Rakefile +17 -2
  8. data/config.yml +4 -0
  9. data/core/data.rbs +1 -1
  10. data/core/enumerator.rbs +14 -2
  11. data/core/exception.rbs +1 -1
  12. data/core/hash.rbs +2 -2
  13. data/core/kernel.rbs +4 -4
  14. data/core/method.rbs +2 -2
  15. data/core/module.rbs +4 -4
  16. data/core/object.rbs +1 -1
  17. data/core/proc.rbs +2 -2
  18. data/core/rbs/unnamed/argf.rbs +3 -3
  19. data/core/rubygems/version.rbs +2 -2
  20. data/core/string.rbs +3 -3
  21. data/core/unbound_method.rbs +1 -1
  22. data/ext/rbs_extension/parser.c +59 -50
  23. data/ext/rbs_extension/parserstate.c +15 -1
  24. data/include/rbs/ruby_objs.h +4 -4
  25. data/lib/rbs/ast/declarations.rb +9 -4
  26. data/lib/rbs/ast/type_param.rb +0 -10
  27. data/lib/rbs/collection/config/lockfile_generator.rb +29 -3
  28. data/lib/rbs/definition.rb +40 -31
  29. data/lib/rbs/definition_builder/ancestor_builder.rb +2 -0
  30. data/lib/rbs/definition_builder.rb +86 -34
  31. data/lib/rbs/environment.rb +8 -4
  32. data/lib/rbs/errors.rb +10 -31
  33. data/lib/rbs/prototype/rb.rb +2 -1
  34. data/lib/rbs/prototype/rbi.rb +2 -1
  35. data/lib/rbs/prototype/runtime.rb +3 -0
  36. data/lib/rbs/types.rb +3 -7
  37. data/lib/rbs/unit_test/type_assertions.rb +2 -2
  38. data/lib/rbs/unit_test/with_aliases.rb +3 -1
  39. data/lib/rbs/version.rb +1 -1
  40. data/sig/annotate/rdoc_source.rbs +2 -0
  41. data/sig/cli.rbs +2 -0
  42. data/sig/collection/config/lockfile_generator.rbs +1 -1
  43. data/sig/declarations.rbs +10 -3
  44. data/sig/definition.rbs +67 -14
  45. data/sig/definition_builder.rbs +17 -3
  46. data/sig/errors.rbs +7 -10
  47. data/sig/namespace.rbs +1 -1
  48. data/sig/typename.rbs +1 -1
  49. data/sig/types.rbs +0 -3
  50. data/src/ruby_objs.c +8 -4
  51. data/src/util/rbs_constant_pool.c +1 -1
  52. data/stdlib/cgi/0/core.rbs +10 -0
  53. data/stdlib/ipaddr/0/ipaddr.rbs +8 -0
  54. data/stdlib/net-http/0/net-http.rbs +1 -1
  55. data/stdlib/openssl/0/openssl.rbs +67 -67
  56. data/stdlib/resolv/0/resolv.rbs +8 -8
  57. data/stdlib/socket/0/addrinfo.rbs +1 -1
  58. data/stdlib/stringio/0/stringio.rbs +1 -1
  59. data/stdlib/uri/0/common.rbs +17 -0
  60. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 276e41777a5de101904ef362e117cfb9c34d22c07ac1d63d691cd5bb743a7648
4
- data.tar.gz: 4f2da0da7f7f1324eab6722c50031c2de57fb9e91afbfc1eda42a9f7ed64dc89
3
+ metadata.gz: fb25e13d5abd921c773e6a321a5bb34a927fc207711f7b68acb2bf574af95b86
4
+ data.tar.gz: 1b5f76e365b67feccb4013a265fea3132d2a6f3df593def013a16f2f666e9233
5
5
  SHA512:
6
- metadata.gz: 20191b57438f79c3adebfc249b7daed6bc58979a1442b259f6a95839da41cdb2963508fa56cab1af2df8e2c91592af52b370faafa059a71fba66d6ff6dc1fbff
7
- data.tar.gz: c63fda458cebf306b7e5874df6cbb0eacad45613293f138d5c37694ab3387f7d51ce3a214d03a03ae2982ab828008e2761a425effb3fb195a0471b9a01755fca
6
+ metadata.gz: 0cbc07d80d8e1d3b26f07e56446099d4b78d42db3cb827414eb906c304ff0cc9c46b2a47ec45b99c0576a3b1759711a9e5b01c1c1a76388ca88d1e963e003db4
7
+ data.tar.gz: c2b6c5d7ec82e5f770290db6d333c4bd20ddb0f682d5003710c5278ae86c9cb57d803d0a33f5e51ffca9d2dcd972b3de22643aab6c04e666967b5cc70a387134
@@ -44,8 +44,6 @@ jobs:
44
44
  bundler: none
45
45
  - name: Set working directory as safe
46
46
  run: git config --global --add safe.directory $(pwd)
47
- - name: Set up permission
48
- run: chmod -R o-w /opt/hostedtoolcache/Ruby
49
47
  - name: Install dependencies
50
48
  run: |
51
49
  sudo apt-get update
@@ -80,3 +78,27 @@ jobs:
80
78
  - name: Run test
81
79
  run: |
82
80
  bundle exec rake ${{ matrix.job }}
81
+ valgrind:
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - uses: actions/checkout@v2
85
+ - uses: ruby/setup-ruby@v1
86
+ with:
87
+ ruby-version: "3.4"
88
+ bundler-cache: none
89
+ - name: Set working directory as safe
90
+ run: git config --global --add safe.directory $(pwd)
91
+ - name: Install dependencies
92
+ run: |
93
+ sudo apt-get update
94
+ sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool python3 valgrind
95
+ - name: Update rubygems & bundler
96
+ run: |
97
+ ruby -v
98
+ gem update --system
99
+ - name: bin/setup
100
+ run: |
101
+ bin/setup
102
+ - run: bundle exec rake test:valgrind
103
+ env:
104
+ RUBY_FREE_AT_EXIT: 1
@@ -20,8 +20,6 @@ jobs:
20
20
  bundler: none
21
21
  - name: Set working directory as safe
22
22
  run: git config --global --add safe.directory $(pwd)
23
- - name: Set up permission
24
- run: chmod -R o-w /opt/hostedtoolcache/Ruby
25
23
  - name: Install dependencies
26
24
  run: |
27
25
  sudo apt-get update
@@ -33,7 +33,7 @@ jobs:
33
33
 
34
34
  res = URI.parse("https://stdgems.org/bundled_gems.json").read
35
35
  bundled_gems = JSON.parse(res)["gems"].map{_1["gem"]}
36
- system "gem uninstall #{bundled_gems.join(" ")}", exception: true
36
+ system "gem uninstall --force #{bundled_gems.join(" ")}", exception: true
37
37
  '
38
38
  - name: bundle install
39
39
  run: |
data/.rubocop.yml CHANGED
@@ -46,12 +46,16 @@ RBS/Style:
46
46
  - 'test/**/*'
47
47
  RBS/Style/BlockReturnBoolish:
48
48
  Enabled: true
49
+ RBS/Style/ClassWithSingleton:
50
+ Enabled: true
49
51
  RBS/Style/DuplicatedType:
50
52
  Enabled: true
51
53
  RBS/Style/EmptyArgument:
52
54
  Enabled: true
53
55
  RBS/Style/InitializeReturnType:
54
56
  Enabled: true
57
+ RBS/Style/InstanceWithInstance:
58
+ Enabled: true
55
59
  RBS/Style/OptionalNil:
56
60
  Enabled: true
57
61
  RBS/Style/RedundantParentheses:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,98 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.9.4 (2025-05-15)
4
+
5
+ ### Miscellaneous
6
+
7
+ * Backport test/CI fixes to 3.9 ([#2487](https://github.com/ruby/rbs/pull/2487))
8
+ * Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468))
9
+
10
+ ## 3.9.3 (2025-05-09)
11
+
12
+ ### Miscellaneous
13
+
14
+ * Use erb instead of set for load path testing ([#2468](https://github.com/ruby/rbs/pull/2468))
15
+
16
+ ## 3.9.2 (2025-03-31)
17
+
18
+ ### Library changes
19
+
20
+ * Change `{}` to `{ 0 }` ([#2354](https://github.com/ruby/rbs/pull/2354))
21
+
22
+ ## 3.9.1 (2025-03-24)
23
+
24
+ ### Miscellaneous
25
+
26
+ * `did_you_mean` is a default gem ([#2348](https://github.com/ruby/rbs/pull/2348))
27
+ * Skip loading ruby_memcheck ([#2347](https://github.com/ruby/rbs/pull/2347))
28
+
29
+ ## 3.9.0 (2025-03-18)
30
+
31
+ ### Miscellaneous
32
+
33
+ * Update steep ([#2328](https://github.com/ruby/rbs/pull/2328))
34
+
35
+ ## 3.9.0.pre.2 (2025-03-14)
36
+
37
+ ### Signature updates
38
+
39
+ * `Hash.new` type ([#2323](https://github.com/ruby/rbs/pull/2323))
40
+ * `Module#define_method` ([#2325](https://github.com/ruby/rbs/pull/2325))
41
+ * `Object#define_singleton_method` ([#2324](https://github.com/ruby/rbs/pull/2324))
42
+
43
+ ### Language updates
44
+
45
+ * Fix `define_method` method block self type ([#2325](https://github.com/ruby/rbs/pull/2325))
46
+
47
+ ## 3.9.0.pre.1 (2025-03-11)
48
+
49
+ ### Signature updates
50
+
51
+ * `CGI.escape/unescape_uri_component` ([#2299](https://github.com/ruby/rbs/pull/2299))
52
+ * `Enumerator::Chain` ([#2220](https://github.com/ruby/rbs/pull/2220))
53
+ * `IO.read` ([#2216](https://github.com/ruby/rbs/pull/2216))
54
+ * `IPAddr#netmask` ([#2311](https://github.com/ruby/rbs/pull/2311))
55
+ * `Kernel#gets`, `Kernel#readline`, `Kernel#readlines` ([#2212](https://github.com/ruby/rbs/pull/2212))
56
+ * `Net::HTTP.start` ([#2225](https://github.com/ruby/rbs/pull/2225))
57
+ * `OpenSSL::BN` ([#2267](https://github.com/ruby/rbs/pull/2267))
58
+ * `OpenSSL::PKey::{RSA,DSA,DH}#params` ([#2255](https://github.com/ruby/rbs/pull/2255))
59
+ * `UNIXSocket#send_io`, `UNIXSocket#recv_io` ([#2264](https://github.com/ruby/rbs/pull/2264))
60
+ * `URI.encode/decode_uri_component` ([#2299](https://github.com/ruby/rbs/pull/2299))
61
+ * Rename to reduce top-level interface and type alias ([#2250](https://github.com/ruby/rbs/pull/2250))
62
+
63
+ ### Language updates
64
+
65
+ * Let class/module alias decls, global decls, and constant decls be annotated ([#2302](https://github.com/ruby/rbs/pull/2302))
66
+ * Add `resolve-type-names: false` magic comment ([#2234](https://github.com/ruby/rbs/pull/2234))
67
+
68
+ ### Library changes
69
+
70
+ * Remove unused root variable ([#2307](https://github.com/ruby/rbs/pull/2307))
71
+ * Run Valgrind on CI and fix memory leaks ([#2309](https://github.com/ruby/rbs/pull/2309))
72
+ * Add information for VariableDuplicationError ([#2310](https://github.com/ruby/rbs/pull/2310))
73
+ * Reduce Array object allocation during parsing ([#2304](https://github.com/ruby/rbs/pull/2304))
74
+ * No class variable duplication validation ([#2305](https://github.com/ruby/rbs/pull/2305))
75
+ * Keep annotations during type name resolution ([#2303](https://github.com/ruby/rbs/pull/2303))
76
+ * Fix method annotations ([#2301](https://github.com/ruby/rbs/pull/2301))
77
+ * Fix class variable ([#2300](https://github.com/ruby/rbs/pull/2300))
78
+ * Add bundled gems to alumnus ([#2288](https://github.com/ruby/rbs/pull/2288))
79
+ * Exclude `attr_*` methods from duplicate checks. ([#2294](https://github.com/ruby/rbs/pull/2294))
80
+ * Validate superclass and module-self-type ([#2289](https://github.com/ruby/rbs/pull/2289))
81
+ * Remove case when `rubygems` and `set` ([#2279](https://github.com/ruby/rbs/pull/2279))
82
+ * Check variable duplication ([#2241](https://github.com/ruby/rbs/pull/2241))
83
+ * Validate variable types ([#2237](https://github.com/ruby/rbs/pull/2237))
84
+ * Remove call to `TypeParam#unchecked!` from C parser ([#2256](https://github.com/ruby/rbs/pull/2256))
85
+ * Remove call to `Any#todo!` from C parser ([#2249](https://github.com/ruby/rbs/pull/2249))
86
+ * [rbs/unit_test] Treat nil as a return value ([#2257](https://github.com/ruby/rbs/pull/2257))
87
+
88
+ ### Miscellaneous
89
+
90
+ * Apply rubocop style to RBS ([#2292](https://github.com/ruby/rbs/pull/2292))
91
+ * Eliminate external HTTP requests on test ([#2253](https://github.com/ruby/rbs/pull/2253))
92
+ * Prevent a warning: the block passed to 'map_type_name' .. may be ignored ([#2248](https://github.com/ruby/rbs/pull/2248))
93
+ * Update ruby version for rubocop ([#2251](https://github.com/ruby/rbs/pull/2251))
94
+ * Drop templates from package ([#2214](https://github.com/ruby/rbs/pull/2214))
95
+
3
96
  ## 3.8.1 (2024-12-27)
4
97
 
5
98
  ### Signature updates
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ bin = File.join(__dir__, "bin")
11
11
 
12
12
  Rake::ExtensionTask.new("rbs_extension")
13
13
 
14
- Rake::TestTask.new(:test => :compile) do |t|
14
+ test_config = lambda do |t|
15
15
  t.libs << "test"
16
16
  t.libs << "lib"
17
17
  t.test_files = FileList["test/**/*_test.rb"].reject do |path|
@@ -19,6 +19,20 @@ Rake::TestTask.new(:test => :compile) do |t|
19
19
  end
20
20
  end
21
21
 
22
+ Rake::TestTask.new(test: :compile, &test_config)
23
+
24
+ unless Gem.win_platform?
25
+ begin
26
+ require "ruby_memcheck"
27
+
28
+ namespace :test do
29
+ RubyMemcheck::TestTask.new(valgrind: :compile, &test_config)
30
+ end
31
+ rescue LoadError => exn
32
+ STDERR.puts "🚨🚨🚨🚨 Skipping RubyMemcheck: #{exn.inspect} 🚨🚨🚨🚨"
33
+ end
34
+ end
35
+
22
36
  multitask :default => [:test, :stdlib_test, :typecheck_test, :rubocop, :validate, :test_doc]
23
37
 
24
38
  task :lexer do
@@ -112,7 +126,7 @@ end
112
126
 
113
127
  task :stdlib_test => :compile do
114
128
  test_files = FileList["test/stdlib/**/*_test.rb"].reject do |path|
115
- path =~ %r{Ractor} || path =~ %r{Encoding}
129
+ path =~ %r{Ractor} || path =~ %r{Encoding} || path =~ %r{CGI_test}
116
130
  end
117
131
 
118
132
  if ENV["RANDOMIZE_STDLIB_TEST_ORDER"] == "true"
@@ -121,6 +135,7 @@ task :stdlib_test => :compile do
121
135
 
122
136
  sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}"
123
137
  # TODO: Ractor tests need to be run in a separate process
138
+ sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/CGI_test.rb"
124
139
  sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb"
125
140
  sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Encoding_test.rb"
126
141
  end
data/config.yml CHANGED
@@ -27,18 +27,21 @@ nodes:
27
27
  - name: old_name
28
28
  - name: location
29
29
  - name: comment
30
+ - name: annotations
30
31
  - name: RBS::AST::Declarations::Constant
31
32
  fields:
32
33
  - name: name
33
34
  - name: type
34
35
  - name: location
35
36
  - name: comment
37
+ - name: annotations
36
38
  - name: RBS::AST::Declarations::Global
37
39
  fields:
38
40
  - name: name
39
41
  - name: type
40
42
  - name: location
41
43
  - name: comment
44
+ - name: annotations
42
45
  - name: RBS::AST::Declarations::Interface
43
46
  fields:
44
47
  - name: name
@@ -67,6 +70,7 @@ nodes:
67
70
  - name: old_name
68
71
  - name: location
69
72
  - name: comment
73
+ - name: annotations
70
74
  - name: RBS::AST::Declarations::TypeAlias
71
75
  fields:
72
76
  - name: name
data/core/data.rbs CHANGED
@@ -411,5 +411,5 @@ class Data
411
411
  # out = origin.with(z: 1) # ArgumentError: unknown keyword: :z
412
412
  # some_point = origin.with(1, 2) # ArgumentError: expected keyword arguments, got positional arguments
413
413
  #
414
- def with: (**untyped) -> instance
414
+ def with: (**untyped) -> self
415
415
  end
data/core/enumerator.rbs CHANGED
@@ -613,7 +613,18 @@ end
613
613
  # This type of objects can be created by Enumerable#chain and Enumerator#+.
614
614
  #
615
615
  class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
616
- include Enumerable[Elem]
616
+ # <!--
617
+ # rdoc-file=enumerator.c
618
+ # - Enumerator::Chain.new(*enums) -> enum
619
+ # -->
620
+ # Generates a new enumerator object that iterates over the elements of given
621
+ # enumerable objects in sequence.
622
+ #
623
+ # e = Enumerator::Chain.new(1..3, [4, 5])
624
+ # e.to_a #=> [1, 2, 3, 4, 5]
625
+ # e.size #=> 5
626
+ #
627
+ def initialize: (*_Each[Elem] enums) -> void
617
628
 
618
629
  # <!--
619
630
  # rdoc-file=enumerator.c
@@ -626,5 +637,6 @@ class Enumerator::Chain[out Elem] < Enumerator[Elem, void]
626
637
  #
627
638
  # If no block is given, returns an enumerator.
628
639
  #
629
- def each: () { (Elem) -> void } -> void
640
+ def each: () { (Elem) -> void } -> self
641
+ | () -> Enumerator[Elem, self]
630
642
  end
data/core/exception.rbs CHANGED
@@ -270,7 +270,7 @@ class Exception
270
270
  # x0..equal?(x1) # => false
271
271
  #
272
272
  def exception: (?self) -> self
273
- | (string | _ToS message) -> instance
273
+ | (string | _ToS message) -> self
274
274
 
275
275
  # <!--
276
276
  # rdoc-file=error.c
data/core/hash.rbs CHANGED
@@ -1845,8 +1845,8 @@ class Hash[unchecked out K, unchecked out V] < Object
1845
1845
  # be resized.
1846
1846
  #
1847
1847
  def initialize: (?capacity: int) -> void
1848
- | [V] (V default, ?capacity: int) -> void
1849
- | [A, B] (?capacity: int) { (Hash[A, B] hash, A key) -> B } -> void
1848
+ | (V default, ?capacity: int) -> void
1849
+ | (?capacity: int) { (Hash[K, V] hash, K key) -> V } -> void
1850
1850
 
1851
1851
  # <!--
1852
1852
  # rdoc-file=hash.c
data/core/kernel.rbs CHANGED
@@ -1163,7 +1163,7 @@ module Kernel : BasicObject
1163
1163
  # The style of programming using `$_` as an implicit parameter is gradually
1164
1164
  # losing favor in the Ruby community.
1165
1165
  #
1166
- def self?.gets: (?String arg0, ?Integer arg1) -> String?
1166
+ def self?.gets: (?String sep, ?Integer limit, ?chomp: boolish) -> String?
1167
1167
 
1168
1168
  # <!--
1169
1169
  # rdoc-file=eval.c
@@ -1486,7 +1486,7 @@ module Kernel : BasicObject
1486
1486
  # Optional keyword argument `chomp` specifies whether line separators are to be
1487
1487
  # omitted.
1488
1488
  #
1489
- def self?.readline: (?String arg0, ?Integer arg1) -> String
1489
+ def self?.readline: (?String arg0, ?Integer arg1, ?chomp: boolish) -> String
1490
1490
 
1491
1491
  # <!--
1492
1492
  # rdoc-file=io.c
@@ -1729,7 +1729,7 @@ module Kernel : BasicObject
1729
1729
  def self?.sleep: (?nil) -> bot
1730
1730
  | (Time::_Timeout duration) -> Integer
1731
1731
 
1732
- %a{steep:deprecated}
1732
+ %a{deprecated}
1733
1733
  interface _Divmod
1734
1734
  def divmod: (Numeric) -> [ Numeric, Numeric ]
1735
1735
  end
@@ -2297,7 +2297,7 @@ module Kernel : BasicObject
2297
2297
  # chris.greet("Hi") #=> "Hi, I'm Chris!"
2298
2298
  #
2299
2299
  def define_singleton_method: (interned name, Method | UnboundMethod | Proc method) -> Symbol
2300
- | (interned name) { (?) -> untyped } -> Symbol
2300
+ | (interned name) { (?) [self: self] -> untyped } -> Symbol
2301
2301
 
2302
2302
  # <!--
2303
2303
  # rdoc-file=io.c
data/core/method.rbs CHANGED
@@ -54,7 +54,7 @@ class Method
54
54
  #
55
55
  def hash: () -> Integer
56
56
 
57
- def dup: () -> instance
57
+ def dup: () -> self
58
58
 
59
59
  # <!--
60
60
  # rdoc-file=proc.c
@@ -252,7 +252,7 @@ class Method
252
252
  # m.call # => "bar"
253
253
  # n = m.clone.call # => "bar"
254
254
  #
255
- def clone: () -> instance
255
+ def clone: () -> self
256
256
 
257
257
  # <!--
258
258
  # rdoc-file=proc.c
data/core/module.rbs CHANGED
@@ -731,8 +731,8 @@ class Module < Object
731
731
  # I'm Dino!
732
732
  # #<B:0x401b39e8>
733
733
  #
734
- def define_method: (interned symbol, ^() [self: instance] -> untyped | Method | UnboundMethod method) -> Symbol
735
- | (interned symbol) { () [self: instance] -> untyped } -> Symbol
734
+ def define_method: (interned symbol, ^(?) [self: top] -> untyped | Method | UnboundMethod method) -> Symbol
735
+ | (interned symbol) { (?) [self: top] -> untyped } -> Symbol
736
736
 
737
737
  # <!--
738
738
  # rdoc-file=object.c
@@ -1164,7 +1164,7 @@ class Module < Object
1164
1164
  # -->
1165
1165
  # Returns the name of the module *mod*. Returns `nil` for anonymous modules.
1166
1166
  #
1167
- def name: () -> String?
1167
+ def name: %a{implicitly-returns-nil} () -> String
1168
1168
 
1169
1169
  # <!--
1170
1170
  # rdoc-file=eval.c
@@ -1699,6 +1699,6 @@ class Module < Object
1699
1699
  def attr: (*interned arg0) -> Array[Symbol]
1700
1700
 
1701
1701
  # A previous incarnation of `interned` for backward-compatibility (see #1499)
1702
- %a{steep:deprecated}
1702
+ %a{deprecated: Use `interned`}
1703
1703
  type id = interned
1704
1704
  end
data/core/object.rbs CHANGED
@@ -106,5 +106,5 @@ class Object < BasicObject
106
106
  end
107
107
 
108
108
  # A previous incarnation of `interned` for backward-compatibility (see #1499)
109
- %a{steep:deprecated}
109
+ %a{deprecated: Use `interned` instead}
110
110
  type Object::name = interned
data/core/proc.rbs CHANGED
@@ -376,8 +376,8 @@ class Proc
376
376
  #
377
377
  def self.new: () { (?) -> untyped } -> instance
378
378
 
379
- def clone: () -> instance
380
- def dup: () -> instance
379
+ def clone: () -> self
380
+ def dup: () -> self
381
381
 
382
382
  # <!-- rdoc-file=proc.c -->
383
383
  # Invokes the block, setting the block's parameters to the values in *params*
@@ -639,7 +639,7 @@ module RBS
639
639
  # See IO.readlines for details about getline_args.
640
640
  #
641
641
  %a{annotate:rdoc:copy:ARGF#gets}
642
- def gets: (?String sep, ?Integer limit) -> String?
642
+ def gets: (?String sep, ?Integer limit, ?chomp: boolish) -> String?
643
643
 
644
644
  # <!--
645
645
  # rdoc-file=io.c
@@ -1024,7 +1024,7 @@ module RBS
1024
1024
  # An EOFError is raised at the end of the file.
1025
1025
  #
1026
1026
  %a{annotate:rdoc:copy:ARGF#readline}
1027
- def readline: (?String sep, ?Integer limit) -> String
1027
+ def readline: (?String sep, ?Integer limit, ?chomp: boolish) -> String
1028
1028
 
1029
1029
  # <!--
1030
1030
  # rdoc-file=io.c
@@ -1044,7 +1044,7 @@ module RBS
1044
1044
  # See `IO.readlines` for a full description of all options.
1045
1045
  #
1046
1046
  %a{annotate:rdoc:copy:ARGF#readlines}
1047
- def readlines: (?String sep, ?Integer limit) -> ::Array[String]
1047
+ def readlines: (?String sep, ?Integer limit, ?chomp: boolish) -> ::Array[String]
1048
1048
 
1049
1049
  # <!--
1050
1050
  # rdoc-file=io.c
@@ -221,7 +221,7 @@ module Gem
221
221
  #
222
222
  # Pre-release (alpha) parts, e.g, 5.3.1.b.2 => 5.4, are ignored.
223
223
  #
224
- def bump: () -> instance
224
+ def bump: () -> self
225
225
 
226
226
  # <!--
227
227
  # rdoc-file=lib/rubygems/version.rb
@@ -274,7 +274,7 @@ module Gem
274
274
  # The release for this version (e.g. 1.2.0.a -> 1.2.0). Non-prerelease versions
275
275
  # return themselves.
276
276
  #
277
- def release: () -> instance
277
+ def release: () -> self
278
278
 
279
279
  # <!--
280
280
  # rdoc-file=lib/rubygems/version.rb
data/core/string.rbs CHANGED
@@ -1936,7 +1936,7 @@ class String
1936
1936
  ?crlf_newline: boolish,
1937
1937
  ?lf_newline: boolish,
1938
1938
  ?fallback: ^(String) -> string? | Method | _EncodeFallbackAref
1939
- ) -> instance
1939
+ ) -> self
1940
1940
 
1941
1941
  interface _EncodeFallbackAref
1942
1942
  def []: (String) -> string?
@@ -3574,10 +3574,10 @@ class String
3574
3574
  def valid_encoding?: () -> bool
3575
3575
  end
3576
3576
 
3577
- %a{steep:deprecated}
3577
+ %a{deprecated}
3578
3578
  interface _ArefFromStringToString
3579
3579
  def []: (String) -> String
3580
3580
  end
3581
3581
 
3582
- %a{steep:deprecated}
3582
+ %a{deprecated}
3583
3583
  type String::encode_fallback = Hash[String, String] | Proc | Method | _ArefFromStringToString
@@ -100,7 +100,7 @@ class UnboundMethod
100
100
  # m.call # => "bar"
101
101
  # n = m.clone.call # => "bar"
102
102
  #
103
- def clone: () -> instance
103
+ def clone: () -> self
104
104
 
105
105
  # <!--
106
106
  # rdoc-file=proc.c