Skip to content

Commit efb5050

Browse files
committed
Use Gem.use_paths method for setting paths
It fixes case for JRuby which returns a regexp from Gem.path_separator, but also improves code by using built in method instead of passing string that later is changed to array again.
1 parent f90890b commit efb5050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/spring/client/binstub.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Binstub < Command
3838
require 'bundler'
3939
4040
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
41-
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
41+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
4242
gem 'spring', match[1]
4343
require 'spring/binstub'
4444
end

0 commit comments

Comments
 (0)