Created
February 14, 2024 10:47
-
-
Save yayamochi/d9accbcf1c28e44274333d9725ce6273 to your computer and use it in GitHub Desktop.
rubocop bug sample code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'rubocop' | |
gem 'parallel' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'parallel' | |
items = [1, 2, 3] | |
Parallel.each(items, | |
finish: lambda { |_item, _index, result| | |
puts "puts result: #{result}" | |
}) do |i| | |
puts i * 10 | |
i * 10 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment