Permalink
Browse files

Inline `sh` method

  • Loading branch information...
josh committed Aug 3, 2011
1 parent a68bb0e commit 95862f0136e4b3c7688c419fd987eb4bb8dc7ac6
Showing with 2 additions and 7 deletions.
  1. +2 −7 lib/execjs/external_runtime.rb
@@ -117,7 +117,8 @@ def runner_source
end
def exec_runtime(filename)
- output = sh("#{@binary} #{filename} 2>&1")
+ output = nil
+ IO.popen("#{@binary} #{filename} 2>&1") { |f| output = f.read }
if $?.success?
output
else
@@ -151,11 +152,5 @@ def which(command)
end
nil
end
-
- def sh(command)
- output = nil
- IO.popen(command) { |f| output = f.read }
- output
- end
end
end

0 comments on commit 95862f0

Please sign in to comment.