diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-13 02:31:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-10-13 02:31:43 +0000 |
commit | 6d77e865c67a4d5458bae533b3b74d1984c9c4f2 (patch) | |
tree | f1aad3112e10277ebc1c8cf8f8ca11893329deb2 /test/rexml | |
parent | 76f85b256ac2271fe721632091545f75089b2321 (diff) | |
download | ruby-6d77e865c67a4d5458bae533b3b74d1984c9c4f2.tar.gz |
Fix tests depending on sort stability
* test/rexml/xpath/test_text.rb (test_ancestors): Array#sort may
not be stable. [ruby-core:76088] [Bug #12509]
* test/rss/test_maker_{0.9,1.0,2.0}.rb (test_items): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml')
-rw-r--r-- | test/rexml/xpath/test_text.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/rexml/xpath/test_text.rb b/test/rexml/xpath/test_text.rb index cea3b05731..7222388e1b 100644 --- a/test/rexml/xpath/test_text.rb +++ b/test/rexml/xpath/test_text.rb @@ -69,7 +69,9 @@ module REXMLTests assert_equal(1, nodes.size, "<b> has one element ancestor") nodes = @doc.get_elements('//b/ancestor::node()') assert_equal(2, nodes.size, "<b> has two node ancestors") - assert_kind_of REXML::Document, nodes[1] + nodes.sort_by!(&:name) + assert_kind_of REXML::Document, nodes[0] + assert_kind_of REXML::Element, nodes[1] end end end |