summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-05-18 12:02:10 -0700
committerAndre Arko <andre@arko.net>2015-05-18 12:02:10 -0700
commit9461131c34ccb7272e27f02dc71311c0957086a2 (patch)
treea2f07b615bd823f7895d1073444c50d1d5dc0beb
parent4b69eaf47dbe110e4e1f84c39f1173211ca16108 (diff)
downloadbundler-9461131c34ccb7272e27f02dc71311c0957086a2.tar.gz
scan is always truthy :’(
-rw-r--r--spec/support/less_than_proc.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/support/less_than_proc.rb b/spec/support/less_than_proc.rb
index ac6193ef59..74f593d750 100644
--- a/spec/support/less_than_proc.rb
+++ b/spec/support/less_than_proc.rb
@@ -3,9 +3,8 @@ class LessThanProc < Proc
def self.with(present)
provided = Gem::Version.new(present.dup)
-
self.new do |required|
- if required.scan(/[=><~]/)
+ if required =~ /[=><~]/
!Gem::Requirement.new(required).satisfied_by?(provided)
else
provided < Gem::Version.new(required)