mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
a70bb8889b
commit
8dcc5ec888
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
# -*- coding: us-ascii -*-
|
# -*- coding: us-ascii -*-
|
||||||
require 'minitest/autorun'
|
require 'minitest/autorun'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
require_relative '../ruby/envutil'
|
||||||
|
|
||||||
if Process.euid == 0
|
if Process.euid == 0
|
||||||
ok = true
|
ok = true
|
||||||
|
@ -26,7 +27,7 @@ module DTrace
|
||||||
d_path = d.path
|
d_path = d.path
|
||||||
rb_path = rb.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)
|
sudo = ENV["SUDO"] and cmd.unshift(sudo)
|
||||||
probes = IO.popen(cmd) do |io|
|
probes = IO.popen(cmd) do |io|
|
||||||
io.readlines
|
io.readlines
|
||||||
|
|
Loading…
Reference in a new issue