From c815f7e7cf7bad7df5e107544cd739f294470433 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Nov 2015 19:34:19 +0000 Subject: 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 --- test/ruby/test_symbol.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3