Skip to content

Commit c47ec7f

Browse files
committed
Update RBI gem to 0.3.8 and update tests
1 parent c149dd9 commit c47ec7f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ GEM
5353
racc (1.8.1)
5454
rainbow (3.1.1)
5555
rake (13.3.1)
56-
rbi (0.3.7)
56+
rbi (0.3.8)
5757
prism (~> 1.0)
5858
rbs (>= 3.4.4)
5959
rbs (4.0.0.dev.4)

test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def foo(a, b); end
255255
RB
256256

257257
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
258-
sig { returns(T::Array[Integer]) }
258+
sig { returns(::T::Array[Integer]) }
259259
attr_accessor :foo
260260
261261
sig { params(a: Integer, b: Integer).returns(Integer) }
@@ -284,7 +284,7 @@ class A
284284
285285
abstract!
286286
287-
requires_ancestor { T.class_of(Foo::Bar) }
287+
requires_ancestor { ::T.class_of(Foo::Bar) }
288288
289289
module B
290290
extend T::Helpers
@@ -369,7 +369,7 @@ module B
369369
class << self
370370
extend T::Generic
371371
372-
A = type_member {{ fixed: T.class_of(Numeric) }}
372+
A = type_member {{ fixed: ::T.class_of(Numeric) }}
373373
end
374374
end
375375
end
@@ -483,8 +483,8 @@ def bar(a)
483483

484484
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
485485
module Aliases
486-
Foo = T.type_alias { T.any(Integer, String) }
487-
MultiLine = T.type_alias { T.any(Integer, String) }
486+
Foo = T.type_alias { ::T.any(Integer, String) }
487+
MultiLine = T.type_alias { ::T.any(Integer, String) }
488488
end
489489
490490
sig { params(a: Aliases::Foo).returns(Aliases::MultiLine) }
@@ -530,7 +530,7 @@ def get_status
530530

531531
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
532532
class Example
533-
Status = T.type_alias { T.untyped }
533+
Status = T.type_alias { ::T.untyped }
534534
535535
sig { returns(Status) }
536536
def get_status
@@ -551,7 +551,7 @@ def double_items(items)
551551
RB
552552

553553
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
554-
List = T.type_alias { T::Array[Integer] }
554+
List = T.type_alias { ::T::Array[Integer] }
555555
556556
sig { params(items: List).returns(List) }
557557
def double_items(items)
@@ -571,7 +571,7 @@ def ensure_string(text)
571571
RB
572572

573573
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
574-
NullableString = T.type_alias { T.nilable(String) }
574+
NullableString = T.type_alias { ::T.nilable(String) }
575575
576576
sig { params(text: NullableString).returns(String) }
577577
def ensure_string(text)
@@ -609,7 +609,7 @@ def foo
609609
RB
610610

611611
assert_equal(<<~RB, rbs_comments_to_sorbet_sigs(contents))
612-
MultiLine = T.type_alias { T.any(String, Integer) }
612+
MultiLine = T.type_alias { ::T.any(String, Integer) }
613613
# foo bar baz
614614
#| | Symbol
615615

0 commit comments

Comments
 (0)