Skip to content

Commit e53e50c

Browse files
justin808claude
andcommitted
Fix RuboCop Performance/ConstantRegexp violation
Add /o option to regexp to optimize compilation performance. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8f4e895 commit e53e50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/react_on_rails/utils_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def mock_dev_server_running
465465
s = { a: "1234567890" }
466466
result = described_class.smart_trim(s, 9)
467467
# Ruby 3.4+ changed hash syntax, so be flexible about the format
468-
expect(result).to match(/\{(:a=|a: ")#{Regexp.escape(Utils::TRUNCATION_FILLER)}90"\}/)
468+
expect(result).to match(/\{(:a=|a: ")#{Regexp.escape(Utils::TRUNCATION_FILLER)}90"\}/o)
469469
end
470470
end
471471
end

0 commit comments

Comments
 (0)