From 8dcc5ec888b5cdf7634fb717823db6e8ad8cef86 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 17 Dec 2012 12:48:12 +0000 Subject: [PATCH] Use EnvUtil.rubybin instead of Gem.ruby [ruby-core:50943] [Bug #7581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dtrace/helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb index 5f74f52512..7a327a8695 100644 --- a/test/dtrace/helper.rb +++ b/test/dtrace/helper.rb @@ -1,6 +1,7 @@ # -*- coding: us-ascii -*- require 'minitest/autorun' require 'tempfile' +require_relative '../ruby/envutil' if Process.euid == 0 ok = true @@ -26,7 +27,7 @@ module DTrace d_path = d.path rb_path = rb.path - cmd = ["dtrace", "-q", "-s", d_path, "-c", "#{Gem.ruby} -I#{INCLUDE} #{rb_path}"] + cmd = ["dtrace", "-q", "-s", d_path, "-c", "#{EnvUtil.rubybin} -I#{INCLUDE} #{rb_path}"] sudo = ENV["SUDO"] and cmd.unshift(sudo) probes = IO.popen(cmd) do |io| io.readlines