From 0b9f0189ae9d3cd081b9e7b55eb3717938c727e3 Mon Sep 17 00:00:00 2001 From: Hibariya Date: Wed, 8 Aug 2018 18:07:35 +0900 Subject: Fix SystemStackError (stack level too deep) in GemHelper#sh_with_code The method always calls itself recursively. It can be supposed that `sh_with_status` should be called rather than `sh_with_code` because Process::Status is called later on. --- lib/bundler/gem_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index ba996d8a85..5b2147e503 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -188,7 +188,7 @@ module Bundler end def sh_with_code(cmd, &block) - outbuf, status = sh_with_code(cmd, &block) + outbuf, status = sh_with_status(cmd, &block) [outbuf, (status && status.exitstatus) || -1] end -- cgit v1.2.1 From 88ea68f800d463f09622b9ef6c4331f704a6bd98 Mon Sep 17 00:00:00 2001 From: Hibariya Date: Fri, 10 Aug 2018 20:17:12 +0900 Subject: Just remove the method since it looks like not used anymore --- lib/bundler/gem_helper.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 5b2147e503..8ed1af231f 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -187,11 +187,6 @@ module Bundler out end - def sh_with_code(cmd, &block) - outbuf, status = sh_with_status(cmd, &block) - [outbuf, (status && status.exitstatus) || -1] - end - if RUBY_VERSION >= "1.9" def sh_with_status(cmd, &block) Bundler.ui.debug(cmd) -- cgit v1.2.1