summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_struct.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index c5ac2eb330..677452879c 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -132,6 +132,10 @@ class TestStruct < Test::Unit::TestCase
klass = Struct.new(:@a)
o = klass.new(1)
assert_equal("#<struct :@a=1>", o.inspect)
+ methods = klass.instance_methods(false)
+ assert_equal([:@a, :"@a="].inspect, methods.inspect, '[Bug #8756]')
+ assert_include(methods, :@a)
+ assert_include(methods, :"@a=")
end
def test_init_copy