diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-07-18 01:27:38 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-07-18 01:27:38 +0530 |
commit | d4f46269404587f8a2be9132c5cf91e2848da7f0 (patch) | |
tree | 936b4257534003cc7a167f994e3e5b2a61f0fcda /actionpack/lib | |
parent | e9bd83402ed1ab86e70c9ec6ffc913b72fd41f1d (diff) | |
download | rails-d4f46269404587f8a2be9132c5cf91e2848da7f0.tar.gz rails-d4f46269404587f8a2be9132c5cf91e2848da7f0.tar.bz2 rails-d4f46269404587f8a2be9132c5cf91e2848da7f0.zip |
Checking with to_s. As regexp fail with 1.8.7
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/renderer/partial_renderer.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/renderer/partial_renderer.rb b/actionpack/lib/action_view/renderer/partial_renderer.rb index e31712eb73..24df3af0e4 100644 --- a/actionpack/lib/action_view/renderer/partial_renderer.rb +++ b/actionpack/lib/action_view/renderer/partial_renderer.rb @@ -300,8 +300,7 @@ module ActionView else paths.map! { |path| retrieve_variable(path).unshift(path) } end - - if String === partial && @variable !~ /^[a-z_][a-zA-Z_0-9]*$/ + if String === partial && @variable.to_s !~ /^[a-z_][a-zA-Z_0-9]*$/ raise ArgumentError.new("The partial name (#{partial}) is not a valid Ruby identifier; " + "make sure your partial name starts with a letter or underscore, " + "and is followed by any combinations of letters, numbers, or underscores.") |