From 2703d55935f924744e776b7714e5b40c09eb84a6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 15 Dec 2007 02:28:42 +0000 Subject: Ruby 1.9 compat: use String#ord to escape filenames for compiled method names git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8404 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 5b34b855e1..0f966addb6 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -450,7 +450,7 @@ If you are rendering a subtemplate, you must now use controller-like partial syn # Asserts the existence of a template. def template_exists?(template_path, extension) file_path = full_template_path(template_path, extension) - !file_path.blank? && @@method_names.has_key?(file_path) || FileTest.exists?(file_path) + !file_path.blank? && @@method_names.has_key?(file_path) || File.exist?(file_path) end # Splits the path and extension from the given template_path and returns as an array. @@ -584,7 +584,7 @@ If you are rendering a subtemplate, you must now use controller-like partial syn if file_name s = File.expand_path(file_name) s.sub!(/^#{Regexp.escape(File.expand_path(RAILS_ROOT))}/, '') if defined?(RAILS_ROOT) - s.gsub!(/([^a-zA-Z0-9_])/) { $1[0].to_s } + s.gsub!(/([^a-zA-Z0-9_])/) { $1.ord } s else (@@inline_template_count += 1).to_s -- cgit v1.2.3