diff options
Diffstat (limited to 'lib/chef/version_class.rb')
-rw-r--r-- | lib/chef/version_class.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/version_class.rb b/lib/chef/version_class.rb index f018833717..f26368902d 100644 --- a/lib/chef/version_class.rb +++ b/lib/chef/version_class.rb @@ -32,11 +32,11 @@ class Chef "#{@major}.#{@minor}.#{@patch}" end - def <=>(v) + def <=>(other) [:major, :minor, :patch].each do |method| version = self.send(method) begin - ans = (version <=> v.send(method)) + ans = (version <=> other.send(method)) rescue NoMethodError # if the other thing isn't a version object, return nil return nil end |