rbs 2.3.1 → 2.3.2
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 +11 -0
- data/Gemfile.lock +1 -1
- data/ext/rbs_extension/extconf.rb +1 -1
- data/ext/rbs_extension/unescape.c +1 -1
- data/lib/rbs/resolver/constant_resolver.rb +5 -15
- data/lib/rbs/version.rb +1 -1
- data/steep/Gemfile.lock +2 -2
- 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: 72915c0f663f0fafeda4cbabba1de64b1d1d0c09fe8296308cb66b57c20311f1
|
4
|
+
data.tar.gz: feb1ae7af7f99635e9a16ae86d39cdb0220672e52aa5a264cff31705d7f892cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f66fa2748f6b1e042498a3bf6a200968d80eca238251e85657f994ebd9a5d4716d162c15168fcebb02890f89c689877ed8d0eecdae0671fcf721220d68d1ded
|
7
|
+
data.tar.gz: a331220a1d7908ac0166b4fbb0e2b0d8c4ca6bb2a79437b9ecd44bd016f88e98dc16b01571e5829620b33d8ba5821b09c6d55c1f18512e5e76863067da509e60
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 2.3.2 (2022-04-06)
|
6
|
+
|
7
|
+
### Library changes
|
8
|
+
|
9
|
+
* Let modules have constants under `::Object` ([\#972](https://github.com/ruby/rbs/pull/972))
|
10
|
+
|
11
|
+
### Miscellaneous
|
12
|
+
|
13
|
+
* Delete `-Wold-style-definition` ([\#971](https://github.com/ruby/rbs/pull/971))
|
14
|
+
* `\e` is not defined in C90 ([\#970](https://github.com/ruby/rbs/pull/970))
|
15
|
+
|
5
16
|
## 2.3.1 (2022-04-05)
|
6
17
|
|
7
18
|
### Library changes
|
data/Gemfile.lock
CHANGED
@@ -22,7 +22,7 @@ void rbs_unescape_string(VALUE string) {
|
|
22
22
|
rb_global_variable(&HASH);
|
23
23
|
rb_hash_aset(HASH, rb_str_new_literal("\\a"), rb_str_new_literal("\a"));
|
24
24
|
rb_hash_aset(HASH, rb_str_new_literal("\\b"), rb_str_new_literal("\b"));
|
25
|
-
rb_hash_aset(HASH, rb_str_new_literal("\\e"), rb_str_new_literal("\
|
25
|
+
rb_hash_aset(HASH, rb_str_new_literal("\\e"), rb_str_new_literal("\033"));
|
26
26
|
rb_hash_aset(HASH, rb_str_new_literal("\\f"), rb_str_new_literal("\f"));
|
27
27
|
rb_hash_aset(HASH, rb_str_new_literal("\\n"), rb_str_new_literal("\n"));
|
28
28
|
rb_hash_aset(HASH, rb_str_new_literal("\\r"), rb_str_new_literal("\r"));
|
@@ -158,21 +158,11 @@ module RBS
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def constants_from_ancestors(module_name, constants:)
|
161
|
-
|
162
|
-
self_types = entry.self_types
|
163
|
-
if self_types.empty?
|
164
|
-
self_types << AST::Declarations::Module::Self.new(
|
165
|
-
name: BuiltinNames::Object.name,
|
166
|
-
args: [],
|
167
|
-
location: nil
|
168
|
-
)
|
169
|
-
end
|
161
|
+
entry = builder.env.class_decls[module_name]
|
170
162
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
end
|
175
|
-
end
|
163
|
+
if entry.is_a?(Environment::ModuleEntry)
|
164
|
+
constants.merge!(table.children(BuiltinNames::Object.name) || raise)
|
165
|
+
constants.merge!(table.toplevel)
|
176
166
|
end
|
177
167
|
|
178
168
|
builder.ancestor_builder.instance_ancestors(module_name).ancestors.reverse_each do |ancestor|
|
@@ -180,7 +170,7 @@ module RBS
|
|
180
170
|
case ancestor.source
|
181
171
|
when AST::Members::Include, :super, nil
|
182
172
|
consts = table.children(ancestor.name) or raise
|
183
|
-
if ancestor.name == BuiltinNames::Object.name
|
173
|
+
if ancestor.name == BuiltinNames::Object.name && entry.is_a?(Environment::ClassEntry)
|
184
174
|
# Insert toplevel constants as ::Object's constants
|
185
175
|
consts.merge!(table.toplevel)
|
186
176
|
end
|
data/lib/rbs/version.rb
CHANGED
data/steep/Gemfile.lock
CHANGED
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: 2.3.
|
4
|
+
version: 2.3.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: 2022-04-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
14
|
definitions.
|