Skip to content

Commit 916f991

Browse files
Avoid String#chars in DedentingHeredoc#to_a
Prefer String#[] directly.
1 parent bffb5c4 commit 916f991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prism/lex_compat.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def to_a
529529
line.each_char.with_index do |char, i|
530530
case char
531531
when "\r"
532-
if line.chars[i + 1] == "\n"
532+
if line[i + 1] == "\n"
533533
break
534534
end
535535
when "\n"

0 commit comments

Comments
 (0)