jeremyevans/sequel — pull request #604 by WrErase (2013-01-25 21:35:10+00:00)
Title: Properly handle connecting to Oracle with prefetch_rows set to a nil value 

I had a bug in my code, which was effectively doing this on connect:
Sequel.connect("oracle://dummy:dummy@dummy", prefetch_rows: nil)

Although I didn't intend to set prefetch_rows to nil, it still worked until sequel 3.43.0. Commit baefc7e (Add a default 'prefetch_rows' value for oracle adapter), changed the way prefetch_rows is handled to add a default:

conn.prefetch_rows = typecast_value_integer(opts.fetch(:prefetch_rows, 100))

Unfortunately, if the prefetch_rows key exists and has a nil value (as above), fetch will return that nil value and not the default. That nil is then passed into typecast_value_integer and raises an exception: "TypeError: can't convert nil into Integer" (lib/sequel/database/misc.rb:399).

This will remove fetch and use an || for the default.