Skip to content

Commit

Permalink
More ends_with? => end_with?
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra committed Oct 27, 2020
1 parent 492a18d commit 29393f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -678,14 +678,14 @@ def patch_win32_makefile_sub
target_content.each_line do |line|
if found.zero? && (line =~ /^CFLAGS = (.*)$/)
found = 1
if Regexp.last_match(1).ends_with?(" #{@cflags}")
if Regexp.last_match(1).end_with?(" #{@cflags}")
f.puts line
else
f.puts "CFLAGS = #{Regexp.last_match(1)} #{@cflags}"
end
elsif found == 1 && (line =~ /^LDFLAGS = (.*)$/)
found = 2
if Regexp.last_match(1).ends_with?(" #{@ldflags}")
if Regexp.last_match(1).end_with?(" #{@ldflags}")
f.puts line
else
f.puts "LDFLAGS = #{Regexp.last_match(1)} #{@ldflags}"
Expand All @@ -709,7 +709,7 @@ def patch_common_mk
target_content.each_line do |line|
if !found && (line =~ /^INCFLAGS = (.*)$/)
found = true
if Regexp.last_match(1).ends_with?(" #{@cflags}")
if Regexp.last_match(1).end_with?(" #{@cflags}")
f.puts line
else
f.puts "INCFLAGS = #{Regexp.last_match(1)} #{@cflags}"
Expand Down

0 comments on commit 29393f4

Please sign in to comment.