summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-20 19:34:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-20 19:34:19 +0000
commitc815f7e7cf7bad7df5e107544cd739f294470433 (patch)
tree4f9355937a5ff85c4e00f670dbf0ee5c4e8df84a /test/ruby/test_symbol.rb
parent8594cab1403199685a35d9e8b7236f5598510119 (diff)
downloadruby-c815f7e7cf7bad7df5e107544cd739f294470433.tar.gz
symbol.c: not freeze the receiver
* symbol.c (rb_str_intern): should not freeze the receiver itself unexpectedly. [ruby-core:71611] [Bug #11721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 64ddf3fcf5..a7ffe7b8b9 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -336,4 +336,12 @@ class TestSymbol < Test::Unit::TestCase
}
end;
end
+
+ def test_not_freeze
+ bug11721 = '[ruby-core:71611] [Bug #11721]'
+ str = "\u{1f363}".taint
+ assert_not_predicate(str, :frozen?)
+ assert_equal str, str.to_sym.to_s
+ assert_not_predicate(str, :frozen?, bug11721)
+ end
end