aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
commit0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a (patch)
tree5778378eafcbdfa37c82c67be1566c76aca249be /actionmailer/lib/action_mailer
parent9264bdc8f618344307f07790a07a60dc04b80434 (diff)
downloadrails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.gz
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.bz2
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.zip
Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/helpers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer/helpers.rb b/actionmailer/lib/action_mailer/helpers.rb
index 8176ba8a9a..7777d16d39 100644
--- a/actionmailer/lib/action_mailer/helpers.rb
+++ b/actionmailer/lib/action_mailer/helpers.rb
@@ -49,7 +49,7 @@ module ActionMailer
begin
require_dependency(file_name)
rescue LoadError => load_error
- requiree = / -- (.*?)(\.rb)?$/.match(load_error).to_a[1]
+ requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]
msg = (requiree == file_name) ? "Missing helper file helpers/#{file_name}.rb" : "Can't load file: #{requiree}"
raise LoadError.new(msg).copy_blame!(load_error)
end
@@ -72,7 +72,7 @@ module ActionMailer
methods.flatten.each do |method|
master_helper_module.module_eval <<-end_eval
def #{method}(*args, &block)
- controller.send(%(#{method}), *args, &block)
+ controller.send!(%(#{method}), *args, &block)
end
end_eval
end
@@ -92,7 +92,7 @@ module ActionMailer
inherited_without_helper(child)
begin
child.master_helper_module = Module.new
- child.master_helper_module.send :include, master_helper_module
+ child.master_helper_module.send! :include, master_helper_module
child.helper child.name.underscore
rescue MissingSourceFile => e
raise unless e.is_missing?("helpers/#{child.name.underscore}_helper")
@@ -108,4 +108,4 @@ module ActionMailer
end
end
end
-end \ No newline at end of file
+end