提交 092a4e29 编写于 作者: S Santiago Pastorino

just < 1.9 is fine and 1.9.1 is not supported

上级 c0b4db0c
......@@ -80,7 +80,7 @@ def test_each_key
keys = []
assert_equal @ordered_hash, @ordered_hash.each_key { |k| keys << k }
assert_equal @keys, keys
expected_class = RUBY_VERSION < '1.9.1' ? Enumerable::Enumerator : Enumerator
expected_class = RUBY_VERSION < '1.9' ? Enumerable::Enumerator : Enumerator
assert_kind_of expected_class, @ordered_hash.each_key
end
......@@ -88,7 +88,7 @@ def test_each_value
values = []
assert_equal @ordered_hash, @ordered_hash.each_value { |v| values << v }
assert_equal @values, values
expected_class = RUBY_VERSION < '1.9.1' ? Enumerable::Enumerator : Enumerator
expected_class = RUBY_VERSION < '1.9' ? Enumerable::Enumerator : Enumerator
assert_kind_of expected_class, @ordered_hash.each_value
end
......@@ -96,7 +96,7 @@ def test_each
values = []
assert_equal @ordered_hash, @ordered_hash.each {|key, value| values << value}
assert_equal @values, values
expected_class = RUBY_VERSION < '1.9.1' ? Enumerable::Enumerator : Enumerator
expected_class = RUBY_VERSION < '1.9' ? Enumerable::Enumerator : Enumerator
assert_kind_of expected_class, @ordered_hash.each
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册