Patches: Browse | Submit New | Admin

[#16474] Ruby 1.9 compatibility

Date:
2007-12-21 02:00
Priority:
3
Submitted By:
Jeremy Kemper (bitsweat)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Ruby 1.9 compatibility

Detailed description
Updated mysql.c.in for Ruby 1.9 changes.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-12-24 12:44
Sender: Dirkjan Bussink

I should have checked this before making a patch too ;). 

There is one problem though, 1.9 does not install the version.h
header anymore. I've created an ugly monkey patch for it, don't
really know what the usual consensus is on this kind of problem.

diff -urN mysql-ruby-2.7.4/extconf.rb
mysql-ruby-2.7.4-fixed/extconf.rb
--- mysql-ruby-2.7.4/extconf.rb 2006-10-29 15:59:44.000000000
+0100
+++ mysql-ruby-2.7.4-fixed/extconf.rb   2007-12-24 04:46:38.000000000
+0100
@@ -68,6 +68,9 @@
       newf.puts "    rb_define_const(eMysql, \"#{s}\",
INT2NUM(#{s}));"
     end
   end
+  if l =~ /#include "ruby.h"/ && RUBY_VERSION
< "1.9" then
+    newf.puts "#include \"version.h\""
+  end
 end

 create_makefile("mysql")
diff -urN mysql-ruby-2.7.4/mysql.c.in
mysql-ruby-2.7.4-fixed/mysql.c.in
--- mysql-ruby-2.7.4/mysql.c.in 2007-08-22 01:20:37.000000000
+0200
+++ mysql-ruby-2.7.4-fixed/mysql.c.in   2007-12-24 04:45:39.000000000
+0100
@@ -3,7 +3,6 @@
  */

 #include "ruby.h"
-#include "version.h"
 #ifdef HAVE_MYSQL_H
 #include <mysql.h>
 #include <errmsg.h>

Date: 2007-12-21 02:02
Sender: Jeremy Kemper

patch is against mysql-ruby-2.7.4

Attached Files:

Name Description Download
mysql-ruby-19.patch Download

Changes:

Field Old Value Date By
File Added2975: mysql-ruby-19.patch2007-12-21 02:01bitsweat