diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 05:58:13 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 05:58:13 +0000 |
commit | dd52ab5a952190bd43f3a90270cdf52c8bb41dee (patch) | |
tree | 6f37e17612143479ac4506f065925615557dce2e /test | |
parent | 81f257aa10cce69cf2bee38f955f7c22c18e93e1 (diff) |
merge revision(s) 49090: [Backport #10686]
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
* test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug
[ruby-core:67268] [Bug #10686]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_symbol.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index a25e6fb5d2..e2f9bfb56c 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -230,4 +230,12 @@ class TestSymbol < Test::Unit::TestCase end assert_nothing_raised(NoMethodError, bug10259) {obj.send("unagi=".intern, 1)} end + + def test_symbol_fstr_leak + bug10686 = '[ruby-core:67268] [Bug #10686]' + x = 0 + assert_no_memory_leak([], '', <<-"end;", bug10686) + 200_000.times { |i| i.to_s.to_sym } + end; + end end |