Browse files

Remove redundant check for is_a?(String)

  • Loading branch information...
1 parent 156039c commit 4c4d5c7e6c028c6a29701abb0f64231ff284a466 Burke Libbey committed May 6, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 actionpack/lib/action_view/path_set.rb
  2. +1 −1 actionpack/lib/action_view/template/error.rb
View
2 actionpack/lib/action_view/path_set.rb
@@ -15,7 +15,7 @@ def find(*args)
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
2 actionpack/lib/action_view/template/error.rb
@@ -29,7 +29,7 @@ class MissingTemplate < ActionViewError #:nodoc:
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"

0 comments on commit 4c4d5c7

Please sign in to comment.