Skip to content

Commit 07331ae

Browse files
committed
remove dead code
1 parent 845b85a commit 07331ae

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/json_mend/parser.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,13 +1088,8 @@ def parse_comment
10881088
# It quickly iterates to find a character, handling escaped characters, and
10891089
# returns the index (offset) from the scanner
10901090
def skip_to_character(characters, start_idx: 0)
1091-
pattern = if characters.is_a?(Regexp)
1092-
characters
1093-
else
1094-
# Escape if it's a string, join if it's an array
1095-
chars = Array(characters).map { |c| Regexp.escape(c.to_s) }
1096-
Regexp.new(chars.join('|'))
1097-
end
1091+
chars = Array(characters).map { |c| Regexp.escape(c.to_s) }
1092+
pattern = Regexp.new(chars.join('|'))
10981093

10991094
saved_pos = @scanner.pos
11001095
# Skip start_idx

0 commit comments

Comments
 (0)