Skip to content

Commit 099da88

Browse files
authored
test_box: avoid failure with --program-suffix (ruby#15734)
1 parent 6a66129 commit 099da88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/ruby/test_box.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# frozen_string_literal: true
22

33
require 'test/unit'
4+
require 'rbconfig'
45

56
class TestBox < Test::Unit::TestCase
67
EXPERIMENTAL_WARNING_LINE_PATTERNS = [
7-
/ruby(\.exe)?: warning: Ruby::Box is experimental, and the behavior may change in the future!/,
8+
/#{RbConfig::CONFIG["ruby_install_name"] || "ruby"}(\.exe)?: warning: Ruby::Box is experimental, and the behavior may change in the future!/,
89
%r{See https://docs.ruby-lang.org/en/(master|\d\.\d)/Ruby/Box.html for known issues, etc.}
910
]
1011
ENV_ENABLE_BOX = {'RUBY_BOX' => '1', 'TEST_DIR' => __dir__}

0 commit comments

Comments
 (0)