Skip to content

Commit 457b3f7

Browse files
fix: sorbet types for enums, and make tapioca detection ignore tapioca dsl
1 parent 4cc7c41 commit 457b3f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/onebusaway_sdk.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
# We already ship the preferred sorbet manifests in the package itself.
2222
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
23-
if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
23+
if Object.const_defined?(:Tapioca) &&
24+
caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
25+
ARGV.none?(/dsl/)
2426
return
2527
end
2628

lib/onebusaway_sdk/internal/util.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,12 @@ def to_sorbet_type(type)
875875
case type
876876
in OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
877877
type.to_sorbet_type
878-
else
878+
in Class | Module
879879
type
880+
in true | false
881+
T::Boolean
882+
else
883+
type.class
880884
end
881885
end
882886
end

0 commit comments

Comments
 (0)