Skip to content

Commit

Permalink
extconf: fix regexps for use-system-libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
dm9pZCAq committed Sep 30, 2022
1 parent 4b4e65a commit 9f9bce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/rugged/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def self.run_cmake(timeout, args)
major = minor = nil

File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR ([0-9]+)$/))
if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
major = matches[1]
next
end

if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR ([0-9]+)$/))
if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
minor = matches[1]
next
end
Expand Down

0 comments on commit 9f9bce7

Please sign in to comment.