summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 07:13:59 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 07:13:59 +0000
commitd83e21d15ddd9142c448aea80dbca6c452ecff6a (patch)
treedc2b85a1176153dc52ec06e97507a20da821248f
parent4bb0fd231e66e61c76396b47b2b7eb8d72cec1c7 (diff)
* lib/rexml/encodings/US-ASCII.rb: typo. [ruby-talk:88650]
* test/ruby/test_system.rb: num of asserts depended on running dir. * test/xsd/test_noencoding.rb: rexml + without iconv/uconv cannot handle euc-jp. install iconv, uconv or xmlscan. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--lib/rexml/encodings/US-ASCII.rb2
-rw-r--r--test/ruby/test_system.rb4
-rw-r--r--test/xsd/test_noencoding.rb6
4 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 29dda9ebbe..03acab4844 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Dec 23 16:08:16 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * lib/rexml/encodings/US-ASCII.rb: typo. [ruby-talk:88650]
+
+ * test/ruby/test_system.rb: num of asserts depended on running dir.
+
+ * test/xsd/test_noencoding.rb: rexml + without iconv/uconv cannot
+ handle euc-jp. install iconv, uconv or xmlscan.
+
Tue Dec 23 14:13:51 2003 akira yamada <akira@ruby-lang.org>
* lib/uri/generic.rb (URI::Generic::check_userinfo,
diff --git a/lib/rexml/encodings/US-ASCII.rb b/lib/rexml/encodings/US-ASCII.rb
index 5beefbd408..32ddfbc909 100644
--- a/lib/rexml/encodings/US-ASCII.rb
+++ b/lib/rexml/encodings/US-ASCII.rb
@@ -1,6 +1,6 @@
module REXML
module Encoding
- @@__REXML_encoding_methods =<<-EOL
+ @@__REXML_encoding_methods =<<-'EOL'
# Convert from UTF-8
def encode content
array_utf8 = content.unpack('U*')
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index d756e4a2d5..71eb7ad183 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -61,8 +61,8 @@ class TestSystem < Test::Unit::TestCase
dir << "/"
end
- for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
- assert_nothing_raised(Exception) do
+ assert_nothing_raised(Exception) do
+ for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
valid_syntax? IO::read(script), script
end
end
diff --git a/test/xsd/test_noencoding.rb b/test/xsd/test_noencoding.rb
index f4a2232faa..48119ec1f7 100644
--- a/test/xsd/test_noencoding.rb
+++ b/test/xsd/test_noencoding.rb
@@ -13,6 +13,12 @@ class TestEmptyCharset < Test::Unit::TestCase
def test_wsdl
begin
xml = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read })
+ rescue RuntimeError
+ if XSD::XMLParser.const_defined?("REXMLParser")
+ STDERR.puts("rexml cannot handle euc-jp without iconv/uconv.")
+ return
+ end
+ raise
rescue Errno::EINVAL
# unsupported encoding
return