aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-15 02:28:42 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-15 02:28:42 +0000
commit2703d55935f924744e776b7714e5b40c09eb84a6 (patch)
tree77e3568ef542ed5e37c4b5fc3b0f98f5774119a3 /actionpack/lib
parent6d5ee8dab37f7cb4a15ab7a3c4369b105055570e (diff)
downloadrails-2703d55935f924744e776b7714e5b40c09eb84a6.tar.gz
rails-2703d55935f924744e776b7714e5b40c09eb84a6.tar.bz2
rails-2703d55935f924744e776b7714e5b40c09eb84a6.zip
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/base.rb4
1 files changed, 2 insertions, 2 deletions
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