1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove redundant check for is_a?(String)

This commit is contained in:
Burke Libbey 2011-05-06 15:28:31 -05:00
parent 156039c4cf
commit 4c4d5c7e6c
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ module ActionView #:nodoc:
end
def find_all(path, prefixes = [], *args)
prefixes = Array.wrap(prefixes) if String === prefixes
prefixes = Array.wrap(prefixes)
prefixes.each do |prefix|
each do |resolver|
templates = resolver.find_all(path, prefix, *args)

View file

@ -29,7 +29,7 @@ module ActionView
def initialize(paths, path, prefixes, partial, details, *)
@path = path
prefixes = Array.wrap(prefixes) if String === prefixes
prefixes = Array.wrap(prefixes)
display_paths = paths.compact.map{ |p| p.to_s.inspect }.join(", ")
template_type = if partial
"partial"