diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-21 06:43:58 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-21 06:43:58 +0000 |
commit | da89931dccab6770984b49c4a563d35f5ac170c3 (patch) | |
tree | f5c07cc5b1b2ba4dbdd30c96e48f24173779e4ad | |
parent | 6793c0a2270e4ec8ccc7450f66a3dc356e44f5b8 (diff) | |
download | ruby-da89931dccab6770984b49c4a563d35f5ac170c3.tar.gz |
rexml: Fix XPath concat() implementation
* lib/rexml/functions.rb (REXML::Functions.concat): Implement.
* test/rexml/test_jaxen.rb: Enable one more test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rexml/functions.rb | 7 | ||||
-rw-r--r-- | test/rexml/test_jaxen.rb | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index 0f91fcd23f..b0029660fa 100644 --- a/lib/rexml/functions.rb +++ b/lib/rexml/functions.rb @@ -186,9 +186,12 @@ module REXML rv end - # UNTESTED def Functions::concat( *objects ) - objects.join + concatenated = "" + objects.each do |object| + concatenated << string(object) + end + concatenated end # Fixed by Mike Stok diff --git a/test/rexml/test_jaxen.rb b/test/rexml/test_jaxen.rb index 671c185ea5..014db69fdf 100644 --- a/test/rexml/test_jaxen.rb +++ b/test/rexml/test_jaxen.rb @@ -30,7 +30,7 @@ module REXMLTests def _test_numbers ; process_test_case("numbers") ; end def test_pi ; process_test_case("pi") ; end def _test_pi2 ; process_test_case("pi2") ; end - def _test_simple ; process_test_case("simple") ; end + def test_simple ; process_test_case("simple") ; end def _test_testNamespaces ; process_test_case("testNamespaces") ; end def _test_text ; process_test_case("text") ; end def _test_underscore ; process_test_case("underscore") ; end |