From 325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 30 Apr 2006 20:36:37 +0000 Subject: 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 --- activesupport/lib/active_support/ordered_options.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3