summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/symbol/test_type.rb4
-rw-r--r--test/ruby/test_struct.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_type.rb b/test/-ext-/symbol/test_type.rb
index 9053d936e2..f1749f55da 100644
--- a/test/-ext-/symbol/test_type.rb
+++ b/test/-ext-/symbol/test_type.rb
@@ -115,6 +115,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 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