aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 15:44:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-12 15:44:24 +0000
commit0884036a0a9d93bb4c3f82f56f997f32557d8159 (patch)
treeb7c728d560098689bfa0c56a06c1eb6bac430260 /test/ruby
parentfbdabf398f397c7c68434b26556e4890133d70c4 (diff)
downloadruby-0884036a0a9d93bb4c3f82f56f997f32557d8159.tar.gz
* file.c (rb_file_s_basename): check encoding of suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_file_exhaustive.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 74b960c54f..4a26e435b8 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -423,6 +423,8 @@ class TestFileExhaustive < Test::Unit::TestCase
end
assert_incompatible_encoding {|d| File.basename(d)}
+ assert_incompatible_encoding {|d| File.basename(d, ".*")}
+ assert_raise(Encoding::CompatibilityError) {File.basename("foo.ext", ".*".encode("utf-16le"))}
end
def test_dirname