Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Satisfy rubocop
  • Loading branch information
marcandre committed Mar 5, 2024
1 parent f7d423d commit 816174a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/backports/3.2.0/enumerator/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
instance_eval <<-'EOT', __FILE__, __LINE__ + 1
def Enumerator.product(*enums, **kwargs, &block)
if kwargs && !kwargs.empty?
raise ArgumentError, "unknown keywords: #{kwargs.keys.map(&:inspect).join(", ")}"
raise ArgumentError, "unknown keywords: #{kwargs.keys.map(&:inspect).join(', ')}"
end
Enumerator::Product.new(*enums).each(&block)
end
Expand All @@ -12,7 +12,7 @@ def Enumerator.product(*enums, **kwargs, &block)
def Enumerator.product(*enums, &block)
kwargs = enums[-1]
if kwargs.is_a?(Hash) && !kwargs.empty?
raise ArgumentError, "unknown keywords: #{kwargs.keys.map(&:inspect).join(", ")}"
raise ArgumentError, "unknown keywords: #{kwargs.keys.map(&:inspect).join(', ')}"
end
Enumerator::Product.new(*enums).each(&block)
end
Expand Down

0 comments on commit 816174a

Please sign in to comment.