aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-01-23 23:04:43 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-01-23 23:28:18 +0300
commit3fbc042b580f518d060671d0dd86ec2a4d14a42b (patch)
tree32aadf0bd9022d1114ce28c03df93dcddb858b5f /actionmailer
parent5e8102179aa6403f56e757f22451f784ea43aebd (diff)
downloadrails-3fbc042b580f518d060671d0dd86ec2a4d14a42b.tar.gz
rails-3fbc042b580f518d060671d0dd86ec2a4d14a42b.tar.bz2
rails-3fbc042b580f518d060671d0dd86ec2a4d14a42b.zip
Use instance_eval instead of Proc#bind
Proc#bind is not useful when called immediately and previous check for #call method is not correct
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb3
1 files changed, 1 insertions, 2 deletions
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