Skip to content

Instantly share code, notes, and snippets.

@macks
Created November 10, 2009 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macks/230745 to your computer and use it in GitHub Desktop.
Save macks/230745 to your computer and use it in GitHub Desktop.
Fix for gist:230744 problem.
diff --git a/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c b/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c
index 87923d5..f62f8e8 100755
--- a/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c
+++ b/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c
@@ -604,6 +604,9 @@ static VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
rb_iv_set(reader, "@reader", Data_Wrap_Struct(rb_cObject, 0, 0, sqlite3_reader));
rb_iv_set(reader, "@field_count", INT2NUM(field_count));
+#ifdef HAVE_RUBY_ENCODING_H
+ rb_iv_set(reader, "@connection", conn_obj);
+#endif
field_names = rb_ary_new();
field_types = rb_iv_get(self, "@field_types");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment