diff --git a/Library/Homebrew/standalone/init.rb b/Library/Homebrew/standalone/init.rb index 45368cb1fadc2..9f9c7831fb968 100644 --- a/Library/Homebrew/standalone/init.rb +++ b/Library/Homebrew/standalone/init.rb @@ -40,7 +40,9 @@ end if Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/") - $LOAD_PATH.unshift "#{RbConfig::CONFIG["rubylibprefix"]}/gems/#{RbConfig::CONFIG["ruby_version"]}/gems/debug-1.6.3/lib" + prefix = RbConfig::CONFIG["rubylibprefix"] + ruby_version = RbConfig::CONFIG["ruby_version"] + $LOAD_PATH.unshift "#{prefix}/gems/#{ruby_version}/gems/debug-1.6.3/lib" end unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)