From 4a3f2a7bc5de8e0b3c1cb18a689d21a66e289f70 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 22 Oct 2008 05:55:22 +0000 Subject: * 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 --- test/dbm/test_dbm.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/dbm') diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb index dc02d30c76..546e969e58 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 -- cgit v1.2.3