mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Checking with to_s. As regexp fail with 1.8.7
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user