summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-08 07:47:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-08 07:47:09 +0000
commitca93e00559d739170150cae27749d64fe07c37fe (patch)
tree67eced22f186c986a9b61316404dfa549aee10ff /test/ruby
parentdddd406b0cbb599a286bbed5c2d97a855af13950 (diff)
* file.c (rb_file_s_basename): returns new string instead of
shared string from FilePathStringValue(). [ruby-core:24199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_file_exhaustive.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 67ac103..881edb5 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -392,8 +392,10 @@ class TestFileExhaustive < Test::Unit::TestCase
def test_basename
assert_equal(File.basename(@file).sub(/\.test$/, ""), File.basename(@file, ".test"))
- assert_equal("", File.basename(""))
- assert_equal("foo", File.basename("foo"))
+ assert_equal("", s = File.basename(""))
+ assert(!s.frozen?, '[ruby-core:24199]')
+ assert_equal("foo", s = File.basename("foo"))
+ assert(!s.frozen?, '[ruby-core:24199]')
assert_equal("foo", File.basename("foo", ".ext"))
assert_equal("foo", File.basename("foo.ext", ".ext"))
assert_equal("foo", File.basename("foo.ext", ".*"))