From f72437bf3f24fa6ed9543b3b77d47a3f0fd593a0 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 20 Oct 2013 10:31:41 +0530 Subject: Remove extra variable creation and merge. --- actionmailer/lib/action_mailer/base.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionmailer/lib/action_mailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index ada86fbc4f..f3d778f0bd 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -685,9 +685,9 @@ module ActionMailer content_type = headers[:content_type] # Call all the procs (if any) - class_default = self.class.default - default_values = class_default.merge(class_default) do |k,v| - v.is_a?(Proc) ? instance_eval(&v) : v + default_values = {} + self.class.default.each do |k,v| + default_values[k] = v.is_a?(Proc) ? instance_eval(&v) : v end # Handle defaults -- cgit v1.2.3