diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb index 443d4b06b5..65d31f61af 100644 --- a/test/rubygems/test_gem_ext_configure_builder.rb +++ b/test/rubygems/test_gem_ext_configure_builder.rb @@ -46,13 +46,13 @@ class TestGemExtConfigureBuilder < Gem::TestCase end end - shell_error_msg = %r{(\./configure: .*)|(Can't open \./configure(?:: No such file or directory)?)} + shell_error_msg = %r{(\./configure: .*)|((?:Can't|cannot) open \./configure(?:: No such file or directory)?)} sh_prefix_configure = "sh ./configure --prefix=" expected = %r(configure failed: #{Regexp.escape sh_prefix_configure}#{Regexp.escape @dest_path} -.*?: #{shell_error_msg} +(?:.*?: )?#{shell_error_msg} ) assert_match expected, error.message