Issue #6021 has been updated by Bohuslav Kabrda.

File dbm.patch added

Got another idea, but that doesn't seem to fix the issue either: the priority in checking condition in db_check2 in extconf.rb seems wrong - the attached patch adds braces that fix this. Still, I think that this patch is valid, as you probably want to check for presence of dbm_open function everytime. In the current condition, the expression gets evaluated like ((x AND y) or z), so that only z needs to be true to work, but I think it should be (x AND (y OR z)).

With the attached patch, I was able to achieve the same thing as with the old gdbm - the "-ldb" flag was passed during linking of dbm.so. But now the mentioned test fails, and also the tests seem to hang after "DB->del: attempt to modify a read-only database". Investigating further :)
----------------------------------------
Bug #6021: TestDBM#test_aref test fails
https://bugs.ruby-lang.org/issues/6021

Author: Vit Ondruch
Status: Feedback
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p105 (2012-02-13 revision 34579) [x86_64-linux]


Testing with Fedora 17/Rawhide, I get following test error:

TestDBM#test_aref = ./ruby: symbol lookup error: /builddir/build/BUILD/ruby-1.9.3-p105/.ext/x86_64-linux/dbm.so: undefined symbol: dbm_open


# rpm -q gdbm
gdbm-1.10-2.fc17.x86_64



-- 
http://bugs.ruby-lang.org/