[前][次][番号順一覧][スレッド一覧]

ruby-changes:43668

From: nobu <ko1@a...>
Date: Mon, 25 Jul 2016 06:43:16 +0900 (JST)
Subject: [ruby-changes:43668] nobu:r55741 (trunk): dtrace: simplify

nobu	2016-07-25 06:43:05 +0900 (Mon, 25 Jul 2016)

  New Revision: 55741

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55741

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

  Modified files:
    trunk/test/dtrace/helper.rb
Index: test/dtrace/helper.rb
===================================================================
--- test/dtrace/helper.rb	(revision 55740)
+++ test/dtrace/helper.rb	(revision 55741)
@@ -43,12 +43,8 @@ module DTrace https://github.com/ruby/ruby/blob/trunk/test/dtrace/helper.rb#L43
       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')

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]