Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Added condition for Object =~ comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 23, 2019
1 parent f9cf48e commit 6dee08c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/support/less_than_proc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6dee08c

Please sign in to comment.