mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
parent
01b723ba6d
commit
e51dca2596
2 changed files with 7 additions and 0 deletions
|
@ -60,6 +60,10 @@ module TestStruct
|
|||
assert_equal(1, o.a)
|
||||
end
|
||||
|
||||
def test_attrset_id
|
||||
assert_raise(ArgumentError) { Struct.new(:x=) }
|
||||
end
|
||||
|
||||
def test_members
|
||||
klass = @Struct.new(:a)
|
||||
o = klass.new(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue