Bug with sdbm?

I found that when trying to store marshalled data in sdbm, it croaks
with the message “sdbm_store failed (SDBMError)” when the marshalled
object contains binary data, such as a compressed file. dbm and gdbm
work fine, as does berkeleydb. This is on Freebsd.

Chris

snacktime wrote:

I found that when trying to store marshalled data in sdbm, it croaks
with the message “sdbm_store failed (SDBMError)” when the marshalled
object contains binary data, such as a compressed file. dbm and gdbm
work fine, as does berkeleydb.

Quoting from Ruby in a Nutshell, page 152:

SDBM:

Public domain implementation of DMB. HAs the same interface as DBM. Runs
almost anywhere but has inferior performance and data-size limitations
compared to the other DBMs…

Looks like you’re hitting those limitations.

Vince