From cdfc3976b4d535866076b0a5fa6f2b94a46b99d6 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Thu, 9 Feb 2023 00:17:47 +0900 Subject: [PATCH] Restore a pending test for processing a regex with regopt This PR reverts a pending test of #10432 because https://github.com/jruby/jruby/issues/7113 has been resolved in JRuby 9.3.9.0. ## JRuby 9.3.3.0 `RegexpError` error will occur: ```console % rbenv local jruby-9.3.3.0 % ruby -e "Regexp.new('\x82', Regexp::NOENCODING)" RegexpError: invalid multibyte escape: /\x82/ initialize at org/jruby/RubyRegexp.java:956 new at org/jruby/RubyClass.java:893
at -e:1 ``` ## JRuby 9.3.9.0 and JRuby 9.4.1.0 No errors: ```console % rbenv local jruby-9.3.9.0 % ruby -e "Regexp.new('\x82', Regexp::NOENCODING)" % rbenv local jruby-9.4.1.0 % ruby -e "Regexp.new('\x82', Regexp::NOENCODING)" ``` --- spec/rubocop/cop/variable_force_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/rubocop/cop/variable_force_spec.rb b/spec/rubocop/cop/variable_force_spec.rb index d8cd52080d7..bddeb5e9491 100644 --- a/spec/rubocop/cop/variable_force_spec.rb +++ b/spec/rubocop/cop/variable_force_spec.rb @@ -28,9 +28,7 @@ end end - # FIXME: Remove `broken_on: jruby` when JRuby incompatible is resolved: - # https://github.com/jruby/jruby/issues/7113 - context 'when processing a regex with regopt', broken_on: :jruby do + context 'when processing a regex with regopt' do let(:node) { parse_source('/\x82/n =~ "a"').ast } it 'does not raise an error' do