mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add freeze test for dbm and gdbm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b5a14bf7c
commit
4e2aa393ef
3 changed files with 9 additions and 1 deletions
|
@ -29,5 +29,12 @@ if defined? GDBM
|
|||
}
|
||||
assert(v)
|
||||
end
|
||||
|
||||
def test_freeze
|
||||
GDBM.open("#{TMPROOT}/a.dbm") {|d|
|
||||
d.freeze
|
||||
assert_raises(TypeError) { d["k"] = "v" }
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue