summaryrefslogtreecommitdiff
path: root/spec/support/less_than_proc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/less_than_proc.rb')
-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)