diff options
author | tduehr <td@matasano.com> | 2015-03-16 17:05:06 -0500 |
---|---|---|
committer | tduehr <td@matasano.com> | 2015-03-16 17:05:06 -0500 |
commit | d3b466af6a5b9f74f96e19cc5396b31144024f4c (patch) | |
tree | a941247edc08cc16c440ad7ffa80ceba729e39a1 | |
parent | 5634da841bcb1d8c7ed2d25acb29d3d55c7f2200 (diff) | |
parent | 4168ef3dbd56a7b52978efb2ff7d0dc448f8f8f1 (diff) | |
download | ffi-d3b466af6a5b9f74f96e19cc5396b31144024f4c.tar.gz |
Merge pull request #421 from abargnesi/version_patterns_ffi419
Anchor ruby version patterns to start of line
-rw-r--r-- | lib/ffi.rb | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,15 +1,15 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx' Object.send(:remove_const, :FFI) if defined?(::FFI) begin - if RUBY_VERSION =~ /1\.8/ + if RUBY_VERSION =~ /^1\.8/ require '1.8/ffi_c' - elsif RUBY_VERSION =~ /1\.9/ + elsif RUBY_VERSION =~ /^1\.9/ require '1.9/ffi_c' - elsif RUBY_VERSION =~ /2\.0/ + elsif RUBY_VERSION =~ /^2\.0/ require '2.0/ffi_c' - elsif RUBY_VERSION =~ /2\.1/ + elsif RUBY_VERSION =~ /^2\.1/ require '2.1/ffi_c' - elsif RUBY_VERSION =~ /2\.2/ + elsif RUBY_VERSION =~ /^2\.2/ require '2.2/ffi_c' else require 'ffi_c' |