diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 17:08:18 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 17:08:18 -0300 |
commit | ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3 (patch) | |
tree | a4fca3811b112ae475a4ef5763388508a24d5a62 /actionpack/lib | |
parent | 1a163dcc412e1e9adae3c788ad0462c592819d4b (diff) | |
download | rails-ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3.tar.gz rails-ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3.tar.bz2 rails-ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3.zip |
Use Kernel#Array instead of Array.wrap in view_paths
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/abstract_controller/view_paths.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_view/lookup_context.rb | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/view_paths.rb b/actionpack/lib/abstract_controller/view_paths.rb index 96118b940f..c08b3a0e2a 100644 --- a/actionpack/lib/abstract_controller/view_paths.rb +++ b/actionpack/lib/abstract_controller/view_paths.rb @@ -89,7 +89,7 @@ module AbstractController # * <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 diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 66a5d59857..194b104c39 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -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 @@ module ActionView #:nodoc: 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 diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb index 3f07314dda..723e8be165 100644 --- a/actionpack/lib/action_view/lookup_context.rb +++ b/actionpack/lib/action_view/lookup_context.rb @@ -102,7 +102,7 @@ module ActionView # 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 = {}) |