aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-04-30 20:36:37 +0000
committerRick Olson <technoweenie@gmail.com>2006-04-30 20:36:37 +0000
commit325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6 (patch)
tree7b623489e92e99c3beae1f1624484a4aaf42e6cc /activesupport/lib
parent59bd6586c8e7e290187978f3868d435ee267006c (diff)
downloadrails-325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6.tar.gz
rails-325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6.tar.bz2
rails-325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6.zip
Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/ordered_options.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb
index 0e97578b3e..1e925145aa 100644
--- a/activesupport/lib/active_support/ordered_options.rb
+++ b/activesupport/lib/active_support/ordered_options.rb
@@ -1,4 +1,5 @@
-class OrderedHash < Array #:nodoc:
+# OrderedHash is namespaced to prevent conflicts with other implementations
+class ActiveSupport::OrderedHash < Array #:nodoc:
def []=(key, value)
if pair = find_pair(key)
pair.pop
@@ -24,7 +25,7 @@ class OrderedHash < Array #:nodoc:
end
end
-class OrderedOptions < OrderedHash #:nodoc:
+class OrderedOptions < ActiveSupport::OrderedHash #:nodoc:
def []=(key, value)
super(key.to_sym, value)
end