1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

dtrace: simplify

* test/dtrace/helper.rb (DTrace::TestCase::RUBYBIN): simply
  substitute basename.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-07-24 21:43:05 +00:00
parent 6ed393ad89
commit ceff9c8dcb

View file

@ -43,12 +43,8 @@ module DTrace
IO.popen(cmd, err: [:child, :out], &:readlines)
end
case rubybin = EnvUtil.rubybin
when /\/ruby-runner#{Regexp.quote(RbConfig::CONFIG["EXEEXT"])}\z/
RUBYBIN = File.dirname(rubybin)+"/miniruby#{RbConfig::CONFIG["EXEEXT"]}"
else
RUBYBIN = rubybin
end
exeext = Regexp.quote(RbConfig::CONFIG["EXEEXT"])
RUBYBIN = EnvUtil.rubybin.sub(/\/ruby-runner(?=#{exeext}\z)/, '/miniruby')
def trap_probe d_program, ruby_program
d = Tempfile.new(%w'probe .d')