Skip to content

Commit 971cdcd

Browse files
committed
Replace split with lines.
1 parent d1062c6 commit 971cdcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/truffle/truffle/cext_preprocessor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def self.patch(file, contents, directory)
9696
# preprocessor macro which _must_ end with a newline and
9797
# so requires that we preserve the trailing whitespace.
9898
patched_file[:patches].each do |patch|
99-
last_line = patch[:replacement].rstrip.split("\n").last.lstrip
99+
last_line = patch[:replacement].rstrip.lines.last.lstrip
100100
contents = contents.gsub(patch[:match],
101101
if last_line && last_line.start_with?('#')
102102
patch[:replacement]

0 commit comments

Comments
 (0)