diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-19 11:06:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-19 11:06:04 +0000 |
commit | ac3c851bdeeb85f5e35fe22bc153abd86178a46e (patch) | |
tree | 93afaefc0e7b8c44d93756e3e0cb0bd49da3b853 /test | |
parent | 3558e886bd3ea1d59a5e84dc0af235ecbc8757e4 (diff) | |
download | ruby-ac3c851bdeeb85f5e35fe22bc153abd86178a46e.tar.gz |
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
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 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 |