Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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