rbs 3.9.0.pre.2 → 3.9.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/core/kernel.rbs +1 -1
- data/core/module.rbs +1 -1
- data/core/object.rbs +1 -1
- data/core/string.rbs +2 -2
- data/lib/rbs/ast/type_param.rb +0 -10
- data/lib/rbs/prototype/rb.rb +2 -1
- data/lib/rbs/prototype/rbi.rb +2 -1
- data/lib/rbs/prototype/runtime.rb +3 -0
- data/lib/rbs/types.rb +3 -7
- data/lib/rbs/unit_test/with_aliases.rb +3 -1
- data/lib/rbs/version.rb +1 -1
- data/sig/annotate/rdoc_source.rbs +2 -0
- data/sig/cli.rbs +2 -0
- data/sig/namespace.rbs +1 -1
- data/sig/typename.rbs +1 -1
- data/sig/types.rbs +0 -3
- data/stdlib/net-http/0/net-http.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99881d9d6dc3248787fcd06f704731455c6a295f040dea8f325b6d4575906de0
|
4
|
+
data.tar.gz: fbb1b6add7b4bba7469e9e33cddecf88d4b566517f385869d7878de519538579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c303d4e3e34b75e5041a42050891868fc52f6a6f66dec8877b56adaef5d039045029e7210e7d597ab7f88f5ec52862437cdbc18e8c0e086b4810559a05b643
|
7
|
+
data.tar.gz: 0b0de8c8ba60b21b53f6e66004afe2519bb34f9c535d54636bc3f4b0772c67f62b7a09399ba88e1df84b482be75601380105a0bad89b3613e2896d158672a648
|
data/CHANGELOG.md
CHANGED
data/core/kernel.rbs
CHANGED
data/core/module.rbs
CHANGED
@@ -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{
|
1702
|
+
%a{deprecated: Use `interned`}
|
1703
1703
|
type id = interned
|
1704
1704
|
end
|
data/core/object.rbs
CHANGED
data/core/string.rbs
CHANGED
@@ -3574,10 +3574,10 @@ class String
|
|
3574
3574
|
def valid_encoding?: () -> bool
|
3575
3575
|
end
|
3576
3576
|
|
3577
|
-
%a{
|
3577
|
+
%a{deprecated}
|
3578
3578
|
interface _ArefFromStringToString
|
3579
3579
|
def []: (String) -> String
|
3580
3580
|
end
|
3581
3581
|
|
3582
|
-
%a{
|
3582
|
+
%a{deprecated}
|
3583
3583
|
type String::encode_fallback = Hash[String, String] | Proc | Method | _ArefFromStringToString
|
data/lib/rbs/ast/type_param.rb
CHANGED
@@ -56,16 +56,6 @@ module RBS
|
|
56
56
|
}.to_json(state)
|
57
57
|
end
|
58
58
|
|
59
|
-
def rename(name)
|
60
|
-
TypeParam.new(
|
61
|
-
name: name,
|
62
|
-
variance: variance,
|
63
|
-
upper_bound: upper_bound_type,
|
64
|
-
location: location,
|
65
|
-
default_type: default_type
|
66
|
-
).unchecked!(unchecked?)
|
67
|
-
end
|
68
|
-
|
69
59
|
def map_type(&block)
|
70
60
|
if b = upper_bound_type
|
71
61
|
_upper_bound_type = yield(b)
|
data/lib/rbs/prototype/rb.rb
CHANGED
data/lib/rbs/prototype/rbi.rb
CHANGED
@@ -250,6 +250,8 @@ module RBS
|
|
250
250
|
method = builder.build_singleton(module_name.absolute!).methods[singleton]
|
251
251
|
method_name = singleton
|
252
252
|
kind = :singleton
|
253
|
+
else
|
254
|
+
raise
|
253
255
|
end
|
254
256
|
|
255
257
|
if method
|
@@ -462,6 +464,7 @@ module RBS
|
|
462
464
|
name: to_type_name(name.to_s),
|
463
465
|
type: type,
|
464
466
|
location: nil,
|
467
|
+
annotations: [],
|
465
468
|
comment: nil
|
466
469
|
)
|
467
470
|
end
|
data/lib/rbs/types.rb
CHANGED
@@ -109,18 +109,14 @@ module RBS
|
|
109
109
|
class Any < Base
|
110
110
|
def initialize(location:, todo: false)
|
111
111
|
super(location: location)
|
112
|
-
|
112
|
+
if todo
|
113
|
+
@string = "__todo__"
|
114
|
+
end
|
113
115
|
end
|
114
116
|
|
115
117
|
def to_s(level=0)
|
116
118
|
@string || "untyped"
|
117
119
|
end
|
118
|
-
|
119
|
-
# @deprecated: this method is now called from the constructor, do not call it from outside
|
120
|
-
def todo!
|
121
|
-
@string = '__todo__'
|
122
|
-
self
|
123
|
-
end
|
124
120
|
end
|
125
121
|
class Nil < Base; end
|
126
122
|
class Top < Base; end
|
@@ -127,7 +127,9 @@ module RBS
|
|
127
127
|
|
128
128
|
# `Range` requires `begin <=> end` to return non-nil, but doesn't actually
|
129
129
|
# end up using the return value of it. This is to add that in when needed.
|
130
|
-
|
130
|
+
unless defined? lower.<=>
|
131
|
+
def lower.<=>(rhs) = :not_nil # steep:ignore MethodDefinitionInUndeclaredModule
|
132
|
+
end
|
131
133
|
|
132
134
|
# If `lower <=> rhs` is defined but nil, then that means we're going to be constructing
|
133
135
|
# an illegal range (eg `3..ToInt.new(4)`). So, we need to skip yielding an invalid range
|
data/lib/rbs/version.rb
CHANGED
@@ -25,6 +25,8 @@ module RBS
|
|
25
25
|
| (TypeName, singleton_method: Symbol) -> Array[RDoc::AnyMethod]?
|
26
26
|
|
27
27
|
def find_attribute: (TypeName, Symbol, singleton: bool) -> Array[RDoc::Attr]?
|
28
|
+
|
29
|
+
def class_docs: (TypeName) -> Array[::RDoc::Markup::Document | ::RDoc::Comment | ::String]?
|
28
30
|
end
|
29
31
|
end
|
30
32
|
end
|
data/sig/cli.rbs
CHANGED
data/sig/namespace.rbs
CHANGED
data/sig/typename.rbs
CHANGED
data/sig/types.rbs
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.0
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-18 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: logger
|