Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2012 21:46
Show Gist options
  • Save anonymous/4375588 to your computer and use it in GitHub Desktop.
Save anonymous/4375588 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/ruby -w
#
# test creation of a new sqlite3 DB file
require 'sqlite3'
db = SQLite3::Database.open "/tmp/foo.db"
# execute contents of file
sql = IO.read 'sqlite3_bug.sql'
db.execute_batch sql
db.close
-- demonstrate bug in sqlite3 ruby gem
CREATE TABLE IF NOT EXISTS foo ( id int );
-- comment at the end causes problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment