partial implementation of result in Ruby

This commit is contained in:
Aaron Patterson 2010-07-06 13:16:49 -07:00
parent f836d0cf68
commit a6b1247ede
4 changed files with 8 additions and 4 deletions

View File

@ -756,9 +756,6 @@ void Init_mysql2() {
rb_define_method(cMysql2Result, "each", rb_mysql_result_each, -1);
rb_define_method(cMysql2Result, "fields", rb_mysql_result_fetch_fields, 0);
VALUE mEnumerable = rb_const_get(rb_cObject, rb_intern("Enumerable"));
rb_include_module(cMysql2Result, mEnumerable);
intern_new = rb_intern("new");
intern_utc = rb_intern("utc");

View File

@ -5,6 +5,7 @@ require 'bigdecimal'
require 'mysql2/error'
require 'mysql2/mysql2'
require 'mysql2/client'
require 'mysql2/result'
# = Mysql2
#

5
lib/mysql2/result.rb Normal file
View File

@ -0,0 +1,5 @@
module Mysql2
class Result
include Enumerable
end
end

View File

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Brian Lopez"]
s.date = %q{2010-07-04}
s.date = %q{2010-07-06}
s.email = %q{seniorlopez@gmail.com}
s.extensions = ["ext/mysql2/extconf.rb"]
s.extra_rdoc_files = [
@ -38,6 +38,7 @@ Gem::Specification.new do |s|
"lib/mysql2/client.rb",
"lib/mysql2/em.rb",
"lib/mysql2/error.rb",
"lib/mysql2/result.rb",
"lib/sequel/adapters/mysql2.rb",
"mysql2.gemspec",
"spec/active_record/active_record_spec.rb",