Skip to content

Commit

Permalink
remove usages of AS::OrderedHash
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishnu Atrai committed Mar 3, 2012
1 parent 2aec357 commit d8996d3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/mime_responds.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def respond_to(*mimes)
# Clear all mime types in <tt>respond_to</tt>. # Clear all mime types in <tt>respond_to</tt>.
# #
def clear_respond_to def clear_respond_to
self.mimes_for_respond_to = ActiveSupport::OrderedHash.new.freeze self.mimes_for_respond_to = Hash.new.freeze
end end
end end


Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/nested_attributes_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def test_should_sort_the_hash_by_the_keys_before_building_new_associated_models


def test_should_raise_an_argument_error_if_something_else_than_a_hash_is_passed def test_should_raise_an_argument_error_if_something_else_than_a_hash_is_passed
assert_nothing_raised(ArgumentError) { @pirate.send(association_setter, {}) } assert_nothing_raised(ArgumentError) { @pirate.send(association_setter, {}) }
assert_nothing_raised(ArgumentError) { @pirate.send(association_setter, ActiveSupport::OrderedHash.new) } assert_nothing_raised(ArgumentError) { @pirate.send(association_setter, Hash.new) }


assert_raise_with_message ArgumentError, 'Hash or Array expected, got String ("foo")' do assert_raise_with_message ArgumentError, 'Hash or Array expected, got String ("foo")' do
@pirate.send(association_setter, "foo") @pirate.send(association_setter, "foo")
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/core_ext/hash_ext_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def test_to_param_hash_escapes_its_keys_and_values
end end


def test_to_param_orders_by_key_in_ascending_order def test_to_param_orders_by_key_in_ascending_order
assert_equal 'a=2&b=1&c=0', ActiveSupport::OrderedHash[*%w(b 1 c 0 a 2)].to_param assert_equal 'a=2&b=1&c=0', Hash[*%w(b 1 c 0 a 2)].to_param
end end
end end


Expand Down
4 changes: 2 additions & 2 deletions activesupport/test/core_ext/object/to_query_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ def empty.to_param; nil end


def test_nested_conversion def test_nested_conversion
assert_query_equal 'person%5Blogin%5D=seckar&person%5Bname%5D=Nicholas', assert_query_equal 'person%5Blogin%5D=seckar&person%5Bname%5D=Nicholas',
:person => ActiveSupport::OrderedHash[:login, 'seckar', :name, 'Nicholas'] :person => Hash[:login, 'seckar', :name, 'Nicholas']
end end


def test_multiple_nested def test_multiple_nested
assert_query_equal 'account%5Bperson%5D%5Bid%5D=20&person%5Bid%5D=10', assert_query_equal 'account%5Bperson%5D%5Bid%5D=20&person%5Bid%5D=10',
ActiveSupport::OrderedHash[:account, {:person => {:id => 20}}, :person, {:id => 10}] Hash[:account, {:person => {:id => 20}}, :person, {:id => 10}]
end end


def test_array_values def test_array_values
Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/application/route_inspector.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def engine?
# executes `rake routes`. People should not use this class. # executes `rake routes`. People should not use this class.
class RouteInspector # :nodoc: class RouteInspector # :nodoc:
def initialize def initialize
@engines = ActiveSupport::OrderedHash.new @engines = Hash.new
end end


def format all_routes, filter = nil def format all_routes, filter = nil
Expand Down

0 comments on commit d8996d3

Please sign in to comment.