From ac3c851bdeeb85f5e35fe22bc153abd86178a46e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Sep 2014 11:06:04 +0000 Subject: symbol.c: fix dynamic attrset ID * symbol.c (rb_str_dynamic_intern): check if the stem ID of attrset ID is already registered as a static ID. [ruby-dev:48559] [Bug #10259] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47643 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 30ed26272f..a25e6fb5d2 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -222,4 +222,12 @@ class TestSymbol < Test::Unit::TestCase '', child_env: '--disable-gems') end + + def test_dynamic_attrset_id + bug10259 = '[ruby-dev:48559] [Bug #10259]' + class << (obj = Object.new) + attr_writer :unagi + end + assert_nothing_raised(NoMethodError, bug10259) {obj.send("unagi=".intern, 1)} + end end -- cgit v1.2.3