summaryrefslogtreecommitdiff
path: root/test/dbm
diff options
context:
space:
mode:
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/dbm
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://ci.ruby-lang.org/ruby/trunk@19885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dbm')
-rw-r--r--test/dbm/test_dbm.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb
index dc02d30..546e969 100644
--- a/test/dbm/test_dbm.rb
+++ b/test/dbm/test_dbm.rb
@@ -334,14 +334,11 @@ if defined? DBM
def test_delete_with_block
key = 'no called block'
@dbm[key] = 'foo'
- assert_equal('foo', @dbm.delete(key) {|k| k.replace 'called block'})
- assert_equal('no called block', key)
+ assert_equal('foo', @dbm.delete(key) {|k| k.replace 'called block'; :blockval})
assert_equal(0, @dbm.size)
key = 'no called block'
- assert_equal(:blockval,
- @dbm.delete(key) {|k| k.replace 'called block'; :blockval})
- assert_equal('called block', key)
+ assert_equal(:blockval, @dbm.delete(key) {|k| k.replace 'called block'; :blockval})
assert_equal(0, @dbm.size)
end