From 5f983809603fdde87cf056fc1f3377e2f0be5d56 Mon Sep 17 00:00:00 2001 From: David Brewer Date: Mon, 11 Apr 2016 23:56:34 +0000 Subject: [PATCH] Fixed version matching in extconf.rb. A regex near the beginning of extconf.rb was intended to determine if the Ruby version was 1.8.x. However, it was written in such a way that it would also match Ruby 2.1.8. In this case, the extension would fail to compile because the wrong headers were being used. --- ext/shadow/extconf.rb | 2 +- lib/libshadow.rb | 2 +- libshadow.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/shadow/extconf.rb b/ext/shadow/extconf.rb index 3e74834..449f26e 100644 --- a/ext/shadow/extconf.rb +++ b/ext/shadow/extconf.rb @@ -6,7 +6,7 @@ require 'mkmf' -$CFLAGS = RUBY_VERSION =~ /1\.8/ ? '-DRUBY18' : '' +$CFLAGS = RUBY_VERSION =~ /^1\.8/ ? '-DRUBY18' : '' if( ! (ok = have_library("shadow","getspent")) ) ok = have_func("getspent") diff --git a/lib/libshadow.rb b/lib/libshadow.rb index e70706b..ab2c8e2 100644 --- a/lib/libshadow.rb +++ b/lib/libshadow.rb @@ -1,5 +1,5 @@ require "shadow" module Shadow - VERSION = "1.0.1" + VERSION = "1.0.2" end diff --git a/libshadow.gemspec b/libshadow.gemspec index b76592d..1f24fbd 100644 --- a/libshadow.gemspec +++ b/libshadow.gemspec @@ -3,7 +3,7 @@ Gem::Specification.new do |s| s.summary = %q{shadow.h} s.description = %q{Ruby C Extension for shadow access} s.homepage = %q{http://github.com/railsmachine/libshadow} - s.version = '1.0.1' + s.version = '1.0.2' s.authors = ["Jesse Newland", "Lee Jones"] s.email = %q{ops@railsmachine.com}