Skip to content

Commit

Permalink
fix Style/SuperArguments
Browse files Browse the repository at this point in the history
  • Loading branch information
olbrich committed Sep 2, 2024
1 parent cb706c6 commit 12e3e45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,3 @@ Style/StringConcatenation:
- 'spec/ruby_units/bugs_spec.rb'
- 'spec/ruby_units/unit_spec.rb'
- 'spec/ruby_units/utf-8/unit_spec.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Style/SuperArguments:
Exclude:
- 'lib/ruby_units/math.rb'
- 'lib/ruby_units/time.rb'
6 changes: 3 additions & 3 deletions lib/ruby_units/math.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def sin(angle)
# @return [Numeric, RubyUnits::Unit]
def asin(number)
if number.is_a?(RubyUnits::Unit)
[super(number), "radian"].to_unit
[super, "radian"].to_unit
else
super
end
Expand All @@ -54,7 +54,7 @@ def cos(angle)
# @return [Numeric, RubyUnits::Unit]
def acos(number)
if number.is_a?(RubyUnits::Unit)
[super(number), "radian"].to_unit
[super, "radian"].to_unit
else
super
end
Expand Down Expand Up @@ -100,7 +100,7 @@ def hypot(x, y)
# @return [RubyUnits::Unit] if argument is a unit
def atan(number)
if number.is_a?(RubyUnits::Unit)
[super(number), "radian"].to_unit
[super, "radian"].to_unit
else
super
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_units/time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def at(*args, **kwargs)
super(args.first.convert_to("second").scalar, **options)
end
else
super(*args, **kwargs)
super
end
end

Expand Down

0 comments on commit 12e3e45

Please sign in to comment.