From: Kazuhiro NISHIYAMA Date: 2008-10-22T03:37:23+09:00 Subject: [ruby-dev:36855] [Bug #675] Failure: test_delete_with_block(TestSDBM) Bug #675: Failure: test_delete_with_block(TestSDBM) http://redmine.ruby-lang.org/issues/show/675 起票者: Kazuhiro NISHIYAMA ステータス: Open, 優先度: Normal 1) Failure: test_delete_with_block(TestSDBM) [.../trunk/test/sdbm/test_sdbm.rb:375]: <"called block"> expected but was <"no called block">. も調べてみました。 ext/sdbm/init.cのfsdbm_deleteで ExportStringValue(keystr); で別のオブジェクトになる可能性があるkeystrを if (rb_block_given_p()) return rb_yield(keystr); でrb_yieldに渡しているのにテストの方で key = 'no called block' assert_equal(:blockval, @sdbm.delete(key) {|k| k.replace 'called block'; :blockval}) assert_equal('called block', key) のように同じオブジェクトが来ると仮定してString#replaceを呼んでいるからのようです。 ---------------------------------------- http://redmine.ruby-lang.org