Permalink
Browse files

Use Kernel#Array instead of Array.wrap in view_paths

  • Loading branch information...
1 parent 1a163dc commit ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3 @rafaelfranca rafaelfranca committed Jan 5, 2012
@@ -89,7 +89,7 @@ def view_paths
# * <tt>paths</tt> - If a PathSet is provided, use that;
# otherwise, process the parameter into a PathSet.
def view_paths=(paths)
- self._view_paths = ActionView::PathSet.new(Array.wrap(paths))
+ self._view_paths = ActionView::PathSet.new(Array(paths))
end
end
end
@@ -1,7 +1,6 @@
require 'active_support/core_ext/module/attr_internal'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/class/attribute'
-require 'active_support/core_ext/array/wrap'
require 'active_support/ordered_options'
require 'action_view/log_subscriber'
require 'active_support/core_ext/module/deprecation'
@@ -160,7 +159,7 @@ def cache_template_loading=(value)
def process_view_paths(value)
value.is_a?(PathSet) ?
- value.dup : ActionView::PathSet.new(Array.wrap(value))
+ value.dup : ActionView::PathSet.new(Array(value))
end
deprecate :process_view_paths
@@ -102,7 +102,7 @@ module ViewPaths
# Whenever setting view paths, makes a copy so we can manipulate then in
# instance objects as we wish.
def view_paths=(paths)
- @view_paths = ActionView::PathSet.new(Array.wrap(paths))
+ @view_paths = ActionView::PathSet.new(Array(paths))
end
def find(name, prefixes = [], partial = false, keys = [], options = {})

0 comments on commit ec28c4f

Please sign in to comment.