From b14dbd7ae2466683f34140fe373c21bc4595d9d2 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Mon, 19 Feb 2018 22:23:02 +0700 Subject: [PATCH] Run redcarpet in redcarpet_bin_test with the interpreter the test started with This fixes test failure for Ruby 2.5 when Ruby 2.3 is the default installed version. --- test/redcarpet_bin_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/redcarpet_bin_test.rb b/test/redcarpet_bin_test.rb index 2b861a79..c9636f68 100644 --- a/test/redcarpet_bin_test.rb +++ b/test/redcarpet_bin_test.rb @@ -64,8 +64,8 @@ def test_legacy_option_parsing def run_bin(*args) bin_path = File.expand_path('../../bin/redcarpet', __FILE__) - ruby = "ruby " if RUBY_PLATFORM =~ /mswin|mingw/ - IO.popen("#{ruby}#{bin_path} #{args.join(" ")}") do |stream| + ruby = RbConfig.ruby + IO.popen("#{ruby} #{bin_path} #{args.join(" ")}") do |stream| @output = stream.read end end