From 3fbc042b580f518d060671d0dd86ec2a4d14a42b Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Mon, 23 Jan 2012 23:04:43 +0300 Subject: Use instance_eval instead of Proc#bind Proc#bind is not useful when called immediately and previous check for #call method is not correct --- actionmailer/lib/action_mailer/base.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionmailer/lib/action_mailer/base.rb') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 457ee24a0f..1800ff5839 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,7 +1,6 @@ require 'mail' require 'action_mailer/collector' require 'active_support/core_ext/object/blank' -require 'active_support/core_ext/proc' require 'active_support/core_ext/string/inflections' require 'active_support/core_ext/hash/except' require 'action_mailer/log_subscriber' @@ -611,7 +610,7 @@ module ActionMailer #:nodoc: # Call all the procs (if any) class_default = self.class.default default_values = class_default.merge(class_default) do |k,v| - v.respond_to?(:call) ? v.bind(self).call : v + v.respond_to?(:to_proc) ? instance_eval(&v) : v end # Handle defaults -- cgit v1.2.3