From 0b36eae450fee18d28ce6fd66b2c3d90112999cc Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 30 Jun 2010 09:36:42 -0700 Subject: [PATCH] moving requires to the .rb files --- ext/mysql2/mysql2_ext.c | 3 --- lib/mysql2.rb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/mysql2/mysql2_ext.c b/ext/mysql2/mysql2_ext.c index d3074ae..7bba561 100644 --- a/ext/mysql2/mysql2_ext.c +++ b/ext/mysql2/mysql2_ext.c @@ -754,9 +754,6 @@ static VALUE rb_raise_mysql2_error(MYSQL *client) { /* Ruby Extension initializer */ void Init_mysql2() { - rb_require("date"); - rb_require("bigdecimal"); - cBigDecimal = rb_const_get(rb_cObject, rb_intern("BigDecimal")); cDate = rb_const_get(rb_cObject, rb_intern("Date")); cDateTime = rb_const_get(rb_cObject, rb_intern("DateTime")); diff --git a/lib/mysql2.rb b/lib/mysql2.rb index d1c4d8f..46cb481 100644 --- a/lib/mysql2.rb +++ b/lib/mysql2.rb @@ -1,4 +1,7 @@ # encoding: UTF-8 +require 'date' +require 'bigdecimal' + require 'mysql2.so' # = Mysql2