summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-24 21:43:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-24 21:43:05 +0000
commitceff9c8dcb343192f711de8cdbe538c535fab22c (patch)
tree90a4e2f8b5bfcb531b3738d88363c31c3a31b8ef /test
parent6ed393ad89eb821d838d70cf13040d3f39237554 (diff)
downloadruby-ceff9c8dcb343192f711de8cdbe538c535fab22c.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/dtrace/helper.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb
index 4beda271c8..22865aac25 100644
--- a/test/dtrace/helper.rb
+++ b/test/dtrace/helper.rb
@@ -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')