rbs 3.6.0.pre.1 → 3.6.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/core/kernel.rbs +1 -1
- data/core/trace_point.rbs +2 -2
- data/lib/rbs/prototype/rb.rb +2 -2
- data/lib/rbs/version.rb +1 -1
- data/sig/types.rbs +12 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3986f50e40a03702c9472964ede255b11e28657c0e0814a250e58749efeb824
|
4
|
+
data.tar.gz: 6f1e5defc9e5d42c84c5692c50e5712ddc92bf51e89958f9bfa511e518e724e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af34f7e1f8547abf07d7a888927aa3cc408480130fc6cc1b94b42c5069b4332b770df805968ff9b31ab957d6cff55601f07d08ce2ede84cec927531465806ad1
|
7
|
+
data.tar.gz: 1e6057a9ffcf93e86ea042aa5aa1061de95107678a1f485930e7a73f22321ba3fd0d7b8b7f8587cd1bc1a18a24a60e6d90768bad4f08f6ddaf8ba75133a37fab
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.6.0.pre.2 (2024-09-18)
|
4
|
+
|
5
|
+
### Signature updates
|
6
|
+
|
7
|
+
* `Kernel#class` ([#2017](https://github.com/ruby/rbs/pull/2017))
|
8
|
+
* `TracePoint#enable` ([#2015](https://github.com/ruby/rbs/pull/2015))
|
9
|
+
|
10
|
+
### Miscellaneous
|
11
|
+
|
12
|
+
* Fix type definition and type errors ([#2016](https://github.com/ruby/rbs/pull/2016))
|
13
|
+
|
3
14
|
## 3.6.0.pre.1 (2024-09-17)
|
4
15
|
|
5
16
|
### Signature updates
|
data/core/kernel.rbs
CHANGED
data/core/trace_point.rbs
CHANGED
@@ -352,8 +352,8 @@ class TracePoint
|
|
352
352
|
# trace.enable { p tp.lineno }
|
353
353
|
# #=> RuntimeError: access from outside
|
354
354
|
#
|
355
|
-
def enable: (?target: Method | RubyVM::InstructionSequence | Proc | nil, ?target_line: int?, ?target_thread: Thread | :default | nil) -> bool
|
356
|
-
| [T] (?target: Method | RubyVM::InstructionSequence | Proc | nil, ?target_line: int?, ?target_thread: Thread | :default | nil) { () -> T } -> T
|
355
|
+
def enable: (?target: Method | UnboundMethod | RubyVM::InstructionSequence | Proc | nil, ?target_line: int?, ?target_thread: Thread | :default | nil) -> bool
|
356
|
+
| [T] (?target: Method | UnboundMethod | RubyVM::InstructionSequence | Proc | nil, ?target_line: int?, ?target_thread: Thread | :default | nil) { () -> T } -> T
|
357
357
|
|
358
358
|
# <!--
|
359
359
|
# rdoc-file=trace_point.rb
|
data/lib/rbs/prototype/rb.rb
CHANGED
@@ -694,7 +694,7 @@ module RBS
|
|
694
694
|
|
695
695
|
types = types.map do |t|
|
696
696
|
if t.is_a?(Types::Literal)
|
697
|
-
type_name = TypeName.new(name: t.literal.class.name
|
697
|
+
type_name = TypeName.new(name: t.literal.class.name&.to_sym || raise, namespace: Namespace.root)
|
698
698
|
Types::ClassInstance.new(name: type_name, args: [], location: nil)
|
699
699
|
else
|
700
700
|
t
|
@@ -825,7 +825,7 @@ module RBS
|
|
825
825
|
AST::Members::ClassVariable => -3,
|
826
826
|
AST::Members::ClassInstanceVariable => -2,
|
827
827
|
AST::Members::InstanceVariable => -1,
|
828
|
-
}
|
828
|
+
} #: Hash[Class, Integer]
|
829
829
|
decls.sort_by! { |decl| [orders.fetch(decl.class, 0), i += 1] }
|
830
830
|
end
|
831
831
|
end
|
data/lib/rbs/version.rb
CHANGED
data/sig/types.rbs
CHANGED
@@ -301,16 +301,23 @@ module RBS
|
|
301
301
|
end
|
302
302
|
|
303
303
|
class Record
|
304
|
-
|
304
|
+
type key = Symbol | String | Integer | bool
|
305
305
|
|
306
|
-
|
306
|
+
# All types of all files
|
307
|
+
#
|
308
|
+
# If the key is *required*, the second value of the tuple is `true`.
|
309
|
+
# If the key is *optional*, the second value of the tuple is `false`.
|
310
|
+
#
|
311
|
+
attr_reader all_fields: Hash[key, [t, bool]]
|
312
|
+
|
313
|
+
attr_reader fields: Hash[key, t]
|
307
314
|
|
308
|
-
attr_reader optional_fields: Hash[
|
315
|
+
attr_reader optional_fields: Hash[key, t]
|
309
316
|
|
310
317
|
type loc = Location[bot, bot]
|
311
318
|
|
312
|
-
def initialize: (fields: Hash[
|
313
|
-
| (all_fields: Hash[
|
319
|
+
def initialize: (fields: Hash[key, t], location: loc?) -> void
|
320
|
+
| (all_fields: Hash[key, [t, bool]], location: loc?) -> void
|
314
321
|
|
315
322
|
include _TypeBase
|
316
323
|
|
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: 3.6.0.pre.
|
4
|
+
version: 3.6.0.pre.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-09-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logger
|
@@ -531,7 +531,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
531
531
|
- !ruby/object:Gem::Version
|
532
532
|
version: '0'
|
533
533
|
requirements: []
|
534
|
-
rubygems_version: 3.5.
|
534
|
+
rubygems_version: 3.5.11
|
535
535
|
signing_key:
|
536
536
|
specification_version: 4
|
537
537
|
summary: Type signature for Ruby.
|