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

ruby-changes:67677

From: aycabta <ko1@a...>
Date: Fri, 10 Sep 2021 07:43:14 +0900 (JST)
Subject: [ruby-changes:67677] 62cecea073 (master): Find irb command path in test

https://git.ruby-lang.org/ruby.git/commit/?id=62cecea073

From 62cecea073a6d86f3176fba11762606c7e1ed2a1 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Fri, 10 Sep 2021 07:43:01 +0900
Subject: Find irb command path in test

---
 test/irb/test_workspace.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb
index e7f3aa8..7439796 100644
--- a/test/irb/test_workspace.rb
+++ b/test/irb/test_workspace.rb
@@ -85,9 +85,16 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_workspace.rb#L85
       pend if RUBY_ENGINE == 'truffleruby'
       bug17623 = '[ruby-core:102468]'
       bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
+      if File.exist?('./exe/irb')
+        irb_path = './exe/irb'
+      elsif File.exist?('./libexec/irb')
+        irb_path = './libexec/irb'
+      else
+        omit 'irb command not found'
+      end
       assert_in_out_err(bundle_exec + ['-W0', '-e', <<~RUBY , '--', '-f', '--'], 'binding.local_variables', /\[:_\]/, [], bug17623)
         version = 'xyz' # typical rubygems loading file
-        load('./exe/irb')
+        load('#{irb_path}')
       RUBY
     end
 
-- 
cgit v1.1


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

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