Skip to content

Commit

Permalink
Remove unused pattern constant (#5054)
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins authored Sep 24, 2024
1 parent 1e45f0d commit 04f76b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/patterns.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Patterns
extend ActiveSupport::Concern

JAVA_HTTP_USER_AGENT = /^java/i
SPECIAL_CHARACTERS = ".-_".freeze
ALLOWED_CHARACTERS = "[A-Za-z0-9#{Regexp.escape(SPECIAL_CHARACTERS)}]+".freeze
ROUTE_PATTERN = /#{ALLOWED_CHARACTERS}(?<!\.gem)/
Expand Down
4 changes: 0 additions & 4 deletions test/unit/patterns_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
require "test_helper"

class PatternsTest < ActiveSupport::TestCase
test "JAVA_HTTP_USER_AGENT is linear" do
assert Regexp.linear_time?(Patterns::JAVA_HTTP_USER_AGENT)
end

test "ROUTE_PATTERN is linear" do
assert Regexp.linear_time?(Patterns::ROUTE_PATTERN)
end
Expand Down

0 comments on commit 04f76b1

Please sign in to comment.