43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From 4f1aefbeca21b6b3eb74252b70e8608dd20bc36a Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
|
Date: Tue, 3 May 2016 07:45:56 +0200
|
|
Subject: [PATCH] Check RUBY_LIB_VERSION instead of RUBY_VERSION.
|
|
|
|
---
|
|
autoload/commandt.vim | 3 +--
|
|
ruby/command-t/ext/command-t/extconf.rb | 5 +----
|
|
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/autoload/commandt.vim b/autoload/commandt.vim
|
|
index 7513f55..1299731 100644
|
|
--- a/autoload/commandt.vim
|
|
+++ b/autoload/commandt.vim
|
|
@@ -200,8 +200,7 @@ ruby << EOF
|
|
# compiled with.
|
|
patchlevel = defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL : nil
|
|
if CommandT::Metadata::UNKNOWN == true || (
|
|
- CommandT::Metadata::EXPECTED_RUBY_VERSION == RUBY_VERSION &&
|
|
- CommandT::Metadata::EXPECTED_RUBY_PATCHLEVEL == patchlevel
|
|
+ CommandT::Metadata::EXPECTED_RUBY_LIB_VERSION == RbConfig::CONFIG['RUBY_LIB_VERSION']
|
|
)
|
|
require 'command-t/ext' # eager load, to catch compilation problems early
|
|
$command_t = CommandT::Controller.new
|
|
diff --git a/ruby/command-t/ext/command-t/extconf.rb b/ruby/command-t/ext/command-t/extconf.rb
|
|
index 8603dad..643fa6a 100644
|
|
--- a/ruby/command-t/ext/command-t/extconf.rb
|
|
+++ b/ruby/command-t/ext/command-t/extconf.rb
|
|
@@ -55,10 +55,7 @@ basedir = Pathname.new(__FILE__).dirname
|
|
# This file was generated by #{(basedir + 'extconf.rb').to_s}
|
|
module CommandT
|
|
module Metadata
|
|
- EXPECTED_RUBY_VERSION = #{RUBY_VERSION.inspect}
|
|
- EXPECTED_RUBY_PATCHLEVEL = #{
|
|
- defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL.inspect : nil.inspect
|
|
- }
|
|
+ EXPECTED_RUBY_LIB_VERSION = #{RbConfig::MAKEFILE_CONFIG['RUBY_LIB_VERSION'].inspect}
|
|
UNKNOWN = false
|
|
end
|
|
end
|
|
--
|
|
2.8.2
|
|
|