aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-10-17 12:42:54 -0400
committerGeorge Claghorn <george@basecamp.com>2018-10-17 12:42:54 -0400
commit2b09cbbe4407ce84b23450b27b2c3b6f35e8ef1b (patch)
tree3ea01a4223d35a4930a36944d65b506f218757d1
parent7903e3ada80d7938b1b78b06d0f678e95367a56b (diff)
downloadrails-2b09cbbe4407ce84b23450b27b2c3b6f35e8ef1b.tar.gz
rails-2b09cbbe4407ce84b23450b27b2c3b6f35e8ef1b.tar.bz2
rails-2b09cbbe4407ce84b23450b27b2c3b6f35e8ef1b.zip
Shush various interpreter warnings
-rw-r--r--app/models/action_mailbox/inbound_email/message_id.rb2
-rw-r--r--lib/action_mailbox/base.rb2
-rw-r--r--lib/action_mailbox/test_helper.rb2
-rw-r--r--test/unit/mailbox/routing_test.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/models/action_mailbox/inbound_email/message_id.rb b/app/models/action_mailbox/inbound_email/message_id.rb
index 590dbfc4d7..a1ec5c0437 100644
--- a/app/models/action_mailbox/inbound_email/message_id.rb
+++ b/app/models/action_mailbox/inbound_email/message_id.rb
@@ -13,7 +13,7 @@ module ActionMailbox::InboundEmail::MessageId
private
def extract_message_id(raw_email)
mail_from_source(raw_email.read).message_id
- rescue => e
+ rescue
# FIXME: Add logging with "Couldn't extract Message ID, so will generating a new random ID instead"
end
end
diff --git a/lib/action_mailbox/base.rb b/lib/action_mailbox/base.rb
index 103bbc544c..01ddc9c59b 100644
--- a/lib/action_mailbox/base.rb
+++ b/lib/action_mailbox/base.rb
@@ -49,7 +49,7 @@ class ActionMailbox::Base
inbound_email.processing!
yield
inbound_email.delivered! unless inbound_email.bounced?
- rescue => exception
+ rescue
inbound_email.failed!
raise
end
diff --git a/lib/action_mailbox/test_helper.rb b/lib/action_mailbox/test_helper.rb
index b1d7af33f9..a74ea8ef57 100644
--- a/lib/action_mailbox/test_helper.rb
+++ b/lib/action_mailbox/test_helper.rb
@@ -9,7 +9,7 @@ module ActionMailbox
end
def create_inbound_email_from_mail(status: :processing, **mail_options)
- raw_email = Tempfile.new.tap { |raw_email| raw_email.write Mail.new(mail_options).to_s }
+ raw_email = Tempfile.new.tap { |io| io.write Mail.new(mail_options).to_s }
create_inbound_email(raw_email, status: status)
end
diff --git a/test/unit/mailbox/routing_test.rb b/test/unit/mailbox/routing_test.rb
index 320dee6aab..f30199b7af 100644
--- a/test/unit/mailbox/routing_test.rb
+++ b/test/unit/mailbox/routing_test.rb
@@ -23,7 +23,7 @@ class ActionMailbox::Base::RoutingTest < ActiveSupport::TestCase
test "delayed routing" do
perform_enqueued_jobs only: ActionMailbox::RoutingJob do
- another_inbound_email = create_inbound_email_from_fixture("welcome.eml", status: :pending)
+ create_inbound_email_from_fixture "welcome.eml", status: :pending
assert_equal "Discussion: Let's debate these attachments", $processed
end
end