path: root/test/sdbm
diff options
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-22 05:55:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-22 05:55:22 +0000
commit4a3f2a7bc5de8e0b3c1cb18a689d21a66e289f70 (patch)
tree33189b96b21739d89c86c21209f21672200331f7 /test/sdbm
parent1d38a821eaad46cd649a911b38a7d3540d6df8a9 (diff)
* string.c (rb_external_str_new_with_enc): no implicit strlen call.
[ruby-dev:36854] * string.c (rb_external_str_new_cstr): new function to create string from external NUL terminated C string. * string.c (rb_locale_str_new_cstr): ditto. * ext/readline/readline.c: now use rb_locale_str_new_cstr(). * test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block): deleted key to the block may be a copy of specified key. * test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/sdbm')
1 files changed, 2 insertions, 5 deletions
diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb
index 0c6df66..b7e8498 100644
--- a/test/sdbm/test_sdbm.rb
+++ b/test/sdbm/test_sdbm.rb
@@ -365,14 +365,11 @@ class TestSDBM < Test::Unit::TestCase
def test_delete_with_block
key = 'no called block'
@sdbm[key] = 'foo'
- assert_equal('foo', @sdbm.delete(key) {|k| k.replace 'called block'})
- assert_equal('no called block', key)
+ assert_equal('foo', @sdbm.delete(key) {|k| k.replace 'called block'; :blockval})
assert_equal(0, @sdbm.size)
key = 'no called block'
- assert_equal(:blockval,
- @sdbm.delete(key) {|k| k.replace 'called block'; :blockval})
- assert_equal('called block', key)
+ assert_equal(:blockval, @sdbm.delete(key) {|k| k.replace 'called block'; :blockval})
assert_equal(0, @sdbm.size)