Skip to content

Commit cbdeb50

Browse files
committed
Ignore set library on loading
1 parent 215adf6 commit cbdeb50

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/rbs/collection/config/lockfile_generator.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,11 @@ def generate
139139
private def assign_stdlib(name:, from_gem:)
140140
return if lockfile.gems.key?(name)
141141

142-
if name == 'rubygems'
143-
if from_gem
144-
RBS.logger.warn "`rubygems` has been moved to core library, so it is always loaded. Remove explicit loading `rubygems` from `#{from_gem}`"
145-
else
146-
RBS.logger.warn '`rubygems` has been moved to core library, so it is always loaded. Remove explicit loading `rubygems`'
147-
end
142+
case name
143+
when 'rubygems', 'set'
144+
msg = "`#{name}` has been moved to core library, so it is always loaded. Remove explicit loading `#{name}`"
145+
msg << " from `#{from_gem}`" if from_gem
146+
RBS.logger.warn msg
148147

149148
return
150149
end

0 commit comments

Comments
 (0)