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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6884f033b29e9db43f782ee20e91a89d329fa51271d015fe0d25d4f4c1dd8166
4
- data.tar.gz: 11db8e1f37cae5204b74d126c80e7b6b75990a33dec81f00519967a517cdf17e
3
+ metadata.gz: f3986f50e40a03702c9472964ede255b11e28657c0e0814a250e58749efeb824
4
+ data.tar.gz: 6f1e5defc9e5d42c84c5692c50e5712ddc92bf51e89958f9bfa511e518e724e5
5
5
  SHA512:
6
- metadata.gz: 9193fb829e1503c2179cc802c20b37bd1b8ed25417bf032a642da25689e0709a753525f5bf2424c57caf4bc57aeb9a5cf03c0062b11e2d36632b1e8b6ae77c31
7
- data.tar.gz: 13a766ee6f81f3ad426af8e6de51289fea8d656b848d038afc15fc21eda0fabc3f525e5035df02b09948113ae0f8ada0965ede862cd17efb52a72ce42631862a
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
@@ -282,7 +282,7 @@ module Kernel : BasicObject
282
282
  # 1.class #=> Integer
283
283
  # self.class #=> Object
284
284
  #
285
- def class: () -> Class
285
+ def class: () -> class
286
286
 
287
287
  # <!--
288
288
  # rdoc-file=vm_eval.c
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
@@ -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.to_sym, namespace: Namespace.root)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RBS
4
- VERSION = "3.6.0.pre.1"
4
+ VERSION = "3.6.0.pre.2"
5
5
  end
data/sig/types.rbs CHANGED
@@ -301,16 +301,23 @@ module RBS
301
301
  end
302
302
 
303
303
  class Record
304
- attr_reader all_fields: Hash[Symbol, [t, bool]]
304
+ type key = Symbol | String | Integer | bool
305
305
 
306
- attr_reader fields: Hash[Symbol, t]
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[Symbol, t]
315
+ attr_reader optional_fields: Hash[key, t]
309
316
 
310
317
  type loc = Location[bot, bot]
311
318
 
312
- def initialize: (fields: Hash[Symbol, t], location: loc?) -> void
313
- | (all_fields: Hash[Symbol, [t, bool]], location: loc?) -> void
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.1
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-17 00:00:00.000000000 Z
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.17
534
+ rubygems_version: 3.5.11
535
535
  signing_key:
536
536
  specification_version: 4
537
537
  summary: Type signature for Ruby.