luislavena/sqlite3-ruby — pull request #56 by evgeny-myasishchev (2011-11-27 21:02:44+00:00)
Title: Fix for #52

IMHO "#if SIZEOF_LONG < 8" [statement.c#L258](https://github.com/luislavena/sqlite3-ruby/blob/master/ext/sqlite3/statement.c#L258) should not be here. Next statement "if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8)" [statement.c#L259](https://github.com/luislavena/sqlite3-ruby/blob/master/ext/sqlite3/statement.c#L259) has same result on 32 and 64 bit archs since RBIGNUM_LEN(value) and SIZEOF_BDIGITS return same values on both archs. So code binding of T_BIGNUM (without #if...) has the same results for both archs.

Just removing the define fixes #52. I have also added extra test to make sure min/max are bound correctly. All tests are passed (including that failing one that reproduces #52) on both archs. The tests was executed on OSX.