diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/symbol/test_type.rb | 4 | ||||
-rw-r--r-- | test/ruby/test_struct.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_type.rb b/test/-ext-/symbol/test_type.rb index d6816754c8..034d8bc0fd 100644 --- a/test/-ext-/symbol/test_type.rb +++ b/test/-ext-/symbol/test_type.rb @@ -105,6 +105,10 @@ module Test_Symbol assert_equal(:"[foo]=", Bug::Symbol.attrset("[foo]")) assert_symtype(Bug::Symbol.attrset("[foo]"), :attrset?) assert_equal(:[]=, Bug::Symbol.attrset(:[])) + assert_symtype(Bug::Symbol.attrset("foo?="), :attrset?) + assert_equal(:"foo?=", Bug::Symbol.attrset(:foo?)) + assert_symtype(Bug::Symbol.attrset("foo!="), :attrset?) + assert_equal(:"foo!=", Bug::Symbol.attrset(:foo!)) end end end diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb index ee8bf3184a..72cb5f480b 100644 --- a/test/ruby/test_struct.rb +++ b/test/ruby/test_struct.rb @@ -319,6 +319,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 @@ -326,6 +328,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 class TopStruct < Test::Unit::TestCase |