From 4c4d5c7e6c028c6a29701abb0f64231ff284a466 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Fri, 6 May 2011 15:28:31 -0500 Subject: [PATCH] Remove redundant check for is_a?(String) --- actionpack/lib/action_view/path_set.rb | 2 +- actionpack/lib/action_view/template/error.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/path_set.rb b/actionpack/lib/action_view/path_set.rb index 1e38b82852..ea5b71bb03 100644 --- a/actionpack/lib/action_view/path_set.rb +++ b/actionpack/lib/action_view/path_set.rb @@ -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) diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb index 6eec0cc23d..1ee05c8f6f 100644 --- a/actionpack/lib/action_view/template/error.rb +++ b/actionpack/lib/action_view/template/error.rb @@ -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"