You're overwriting the passed-in options hash here. Incidentally, I'd be in favor of changing the call signature to accept an options hash, with keys: :packed, :file_warning, :tmpdir, and :csv_options. This way you could accept an options hash at line 7 above and just pass it into all of the calls to .new, uncrippling Spreadsheet.open.