Skip to content

Commit

Permalink
Merge pull request #135 from piotr-iohk/more_end_with
Browse files Browse the repository at this point in the history
More ends_with? => end_with?
  • Loading branch information
pmq20 committed Oct 27, 2020
2 parents 492a18d + 29393f4 commit ca36def
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 ca36def

Please sign in to comment.