summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Koronen <koronen@kth.se>2015-08-08 16:23:52 +0200
committerVictor Koronen <koronen@kth.se>2015-08-14 12:29:43 +0200
commit95bb960606a60a45c8acbf91db031b02d77bf5a6 (patch)
tree83889c72e4109a0f6b140a2d99a226ad68d29e93
parent6e9f4baf83508545f395d3221f2c4108abbb638f (diff)
downloadbundler-95bb960606a60a45c8acbf91db031b02d77bf5a6.tar.gz
Fix Style/Proc
-rw-r--r--.rubocop_todo.yml5
-rw-r--r--spec/bundler/retry_spec.rb2
-rw-r--r--spec/support/sometimes.rb2
3 files changed, 2 insertions, 7 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index fe4f7d04b0..2649b38116 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -311,11 +311,6 @@ Style/PerlBackrefs:
Style/PredicateName:
Enabled: false
-# Offense count: 3
-# Cop supports --auto-correct.
-Style/Proc:
- Enabled: false
-
# Offense count: 8
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/RaiseArgs:
diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb
index 23e6668438..03f74cd511 100644
--- a/spec/bundler/retry_spec.rb
+++ b/spec/bundler/retry_spec.rb
@@ -12,7 +12,7 @@ describe Bundler::Retry do
end
it "returns the first valid result" do
- jobs = [Proc.new { raise "foo" }, Proc.new { :bar }, Proc.new { raise "foo" }]
+ jobs = [proc { raise "foo" }, proc { :bar }, proc { raise "foo" }]
attempts = 0
result = Bundler::Retry.new(nil, nil, 3).attempt do
attempts += 1
diff --git a/spec/support/sometimes.rb b/spec/support/sometimes.rb
index 99fc9e9444..0ab15d974f 100644
--- a/spec/support/sometimes.rb
+++ b/spec/support/sometimes.rb
@@ -29,7 +29,7 @@ RSpec.configure do |config|
end
config.after(:suite) do
- message = Proc.new do |color, text|
+ message = proc do |color, text|
colored = RSpec::Core::Formatters::ConsoleCodes.wrap(text, color)
notification = RSpec::Core::Notifications::MessageNotification.new(colored)
RSpec.configuration.formatters.first.message(notification)