summaryrefslogtreecommitdiff
path: root/lib/chef/version_class.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-12 11:14:17 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-16 18:41:25 -0700
commit43da5b5de2618290c09e5775063f7ec21ec5b667 (patch)
tree5327f70506c264a6f1545423fc383c2d2c76bf03 /lib/chef/version_class.rb
parent8069ed78dc8ed361f81064bca4da4b63c72559a4 (diff)
downloadchef-43da5b5de2618290c09e5775063f7ec21ec5b667.tar.gz
fixes Style/OpMethod cop
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/version_class.rb')
-rw-r--r--lib/chef/version_class.rb4
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