From 0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 2 Oct 2007 05:32:14 +0000 Subject: Ruby 1.9 compat, consistent load paths git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/lib/action_mailer/helpers.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionmailer/lib/action_mailer') 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 -- cgit v1.2.3