summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-01-23 11:45:01 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-01-23 11:45:01 +0900
commit6dee08c056dc2bbf2479b47e5a341294a5706330 (patch)
treecef7cc321e50b12a82b130ed57d868b7f9d87584
parentf9cf48e4843f2f95370c99b796288db34fd8b60f (diff)
downloadbundler-ignore-object-regex.tar.gz
Added condition for Object =~ comparison.ignore-object-regex
-rw-r--r--spec/support/less_than_proc.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/less_than_proc.rb b/spec/support/less_than_proc.rb
index ddac5458b7..68d37b44c9 100644
--- a/spec/support/less_than_proc.rb
+++ b/spec/support/less_than_proc.rb
@@ -6,7 +6,7 @@ class LessThanProc < Proc
def self.with(present)
provided = Gem::Version.new(present.dup)
new do |required|
- if required =~ /[=><~]/
+ if required.is_a?(String) && required =~ /[=><~]/
!Gem::Requirement.new(required).satisfied_by?(provided)
else
provided < Gem::Version.new(required)