aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/ordered_hash_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/ordered_hash_test.rb')
-rw-r--r--activesupport/test/ordered_hash_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb
index bbaccf2594..31eeb7f565 100644
--- a/activesupport/test/ordered_hash_test.rb
+++ b/activesupport/test/ordered_hash_test.rb
@@ -127,7 +127,13 @@ class OrderedHashTest < Test::Unit::TestCase
assert_equal @keys, @ordered_hash.select { true }.map(&:first)
new_ordered_hash = @ordered_hash.select { true }
assert_equal @keys, new_ordered_hash.map(&:first)
- assert_instance_of ActiveSupport::OrderedHash, new_ordered_hash
+
+ if RUBY_VERSION > '1.9'
+ assert_instance_of ActiveSupport::OrderedHash, new_ordered_hash
+ else
+ # Ruby 1.8.7 returns an Array from Hash#select
+ assert_instance_of Array, new_ordered_hash
+ end
end
def test_delete_if