Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix a wrong type check in self.new #838

Merged
merged 1 commit into from

2 participants

@kana

The change introduced by 81d806d is wrong. It compares a String instance to Class. So that the condition is always evaluated to false.

@zzak zzak merged commit 8b37d86 into rubygems:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 1, 2014
  1. @kana
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rubygems/version.rb
View
2  lib/rubygems/version.rb
@@ -189,7 +189,7 @@ def self.create input
@@all = {}
def self.new version # :nodoc:
- return super unless Gem::VERSION == self.class
+ return super unless Gem::Version == self
@@all[version] ||= super
end
Something went wrong with that request. Please try again.