From 4c7726516c2b3b54cd0a78a214f005881fc68aba Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 9 Feb 2023 14:47:59 +0100 Subject: [PATCH] [ruby/strscan] Mask out this test on JRuby/Windows See https://github.com/jruby/jruby/issues/7644 for the root issue, which will require fixes to JRuby's regular expression engine, JOni. https://github.com/ruby/strscan/commit/29a65abff2 --- test/strscan/test_stringscanner.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/strscan/test_stringscanner.rb b/test/strscan/test_stringscanner.rb index 35efdc3a1f..b7ffac816d 100644 --- a/test/strscan/test_stringscanner.rb +++ b/test/strscan/test_stringscanner.rb @@ -465,7 +465,10 @@ module StringScannerTests assert_equal 'foo', s['a'] assert_equal 'bar', s['b'] assert_raise(IndexError) { s['c'] } - assert_raise_with_message(IndexError, /\u{30c6 30b9 30c8}/) { s["\u{30c6 30b9 30c8}"] } + # see https://github.com/jruby/jruby/issues/7644 + unless RUBY_ENGINE == "jruby" && RbConfig::CONFIG['host_os'] =~ /mswin|win32|mingw/ + assert_raise_with_message(IndexError, /\u{30c6 30b9 30c8}/) { s["\u{30c6 30b9 30c8}"] } + end end def test_pre_match