diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-13 06:43:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-13 06:43:18 +0000 |
commit | 5b56c1c42bb4745d2c05b8ed01734146e6e7ef44 (patch) | |
tree | 746417762980348811f1ed93d614df4156aeb94e /test/ruby/test_struct.rb | |
parent | bb7ae984f8ae63083dde38587f4a562271856f52 (diff) | |
download | ruby-5b56c1c42bb4745d2c05b8ed01734146e6e7ef44.tar.gz |
parse.y: attrset from junk ID
* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug.
* parse.y (rb_enc_symname_type): junk ID succeeded by '=' is also
attrset ID. [ruby-core:60668] [Bug #8756]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_struct.rb')
-rw-r--r-- | test/ruby/test_struct.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb index e23b5b021c..2acec57808 100644 --- a/test/ruby/test_struct.rb +++ b/test/ruby/test_struct.rb @@ -289,6 +289,8 @@ module TestStruct x = Object.new o = klass.new("test", x) assert_same(x, o.b?) + o.send("b?=", 42) + assert_equal(42, o.b?) end def test_bang_mark_in_member @@ -296,6 +298,8 @@ module TestStruct x = Object.new o = klass.new("test", x) assert_same(x, o.b!) + o.send("b!=", 42) + assert_equal(42, o.b!) end def test_setter_method_returns_value |