diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-07 07:30:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-07 07:30:31 +0000 |
commit | 075d98c7dc0cee294f03ed0ed26e1e8d8876b2b9 (patch) | |
tree | 9e8837ee94ededc62b66b5c4f7a97e9477ba4d0a /test/ruby | |
parent | 8e07edf364398a9843dc939ec7e5ec7acdf62b95 (diff) | |
download | ruby-075d98c7dc0cee294f03ed0ed26e1e8d8876b2b9.tar.gz |
* error.c (rb_load_fail): should honor encoding.
* load.c (load_failed): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_require.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index e0e885dce6..de99fbdff4 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -50,8 +50,10 @@ class TestRequire < Test::Unit::TestCase def test_require_nonascii bug3758 = '[ruby-core:31915]' - e = assert_raise(LoadError, bug3758) {require "\u{221e}"} - assert_match(/\u{221e}\z/, e.message, bug3758) + ["\u{221e}", "\x82\xa0".force_encoding("cp932")].each do |path| + e = assert_raise(LoadError, bug3758) {require path} + assert_match(/#{path}\z/, e.message, bug3758) + end end def test_require_path_home_1 |