Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Mar 24, 2024
1 parent 2f82801 commit 3a6989b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/parallel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ def map_with_index(array, options = {}, &block)
map(array, options.merge(with_index: true), &block)
end

def flat_map(*args, &block)
map(*args, &block).flatten(1)
def flat_map(...)
map(...).flatten(1)
end

def filter_map(*args, &block)
map(*args, &block).compact
def filter_map(...)
map(...).compact
end

# Number of physical processor cores on the current system.
Expand Down
2 changes: 1 addition & 1 deletion spec/cases/profile_memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def count_objects
GC.start
GC.start
ObjectSpace.each_object { |o| cur[o.class] += 1 }
cur.map { |k, v| [k, v - old[k]] }.to_h.reject { |_k, v| v == 0 }
cur.to_h { |k, v| [k, v - old[k]] }.reject { |_k, v| v == 0 }
end

class Callback
Expand Down

0 comments on commit 3a6989b

Please sign in to comment.