aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/paths.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-08-21 00:28:25 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-21 00:28:25 -0500
commitf388725bd61d8ae246c0c8e42eaec1a2be4620ac (patch)
tree2375c551cb8f4b892471e8618d11785c95ce710b /actionpack/lib/action_view/paths.rb
parent47cd8b81cc19345aa68323755c78ab03f8176590 (diff)
downloadrails-f388725bd61d8ae246c0c8e42eaec1a2be4620ac.tar.gz
rails-f388725bd61d8ae246c0c8e42eaec1a2be4620ac.tar.bz2
rails-f388725bd61d8ae246c0c8e42eaec1a2be4620ac.zip
Partial revert of 2681685 premature TypeArray abstraction
Diffstat (limited to 'actionpack/lib/action_view/paths.rb')
-rw-r--r--actionpack/lib/action_view/paths.rb26
1 files changed, 25 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb
index 6a118a1cfa..d6bf2137af 100644
--- a/actionpack/lib/action_view/paths.rb
+++ b/actionpack/lib/action_view/paths.rb
@@ -1,5 +1,5 @@
module ActionView #:nodoc:
- class PathSet < ActiveSupport::TypedArray #:nodoc:
+ class PathSet < Array #:nodoc:
def self.type_cast(obj)
if obj.is_a?(String)
if Base.warn_cache_misses && defined?(Rails) && Rails.initialized?
@@ -15,6 +15,30 @@ module ActionView #:nodoc:
end
end
+ def initialize(*args)
+ super(*args).map! { |obj| self.class.type_cast(obj) }
+ end
+
+ def <<(obj)
+ super(self.class.type_cast(obj))
+ end
+
+ def concat(array)
+ super(array.map! { |obj| self.class.type_cast(obj) })
+ end
+
+ def insert(index, obj)
+ super(index, self.class.type_cast(obj))
+ end
+
+ def push(*objs)
+ super(*objs.map { |obj| self.class.type_cast(obj) })
+ end
+
+ def unshift(*objs)
+ super(*objs.map { |obj| self.class.type_cast(obj) })
+ end
+
class Path #:nodoc:
def self.eager_load_templates!
@eager_load_templates = true