[ruby-oci8-commit] [356] trunk/ruby-oci8: * ext/oci8/extconf.rb: Fixed for ruby 1.9.2 preview1 .

nobody at rubyforge.org nobody at rubyforge.org
Sat Sep 12 09:49:16 EDT 2009


Revision: 356
Author:   kubo
Date:     2009-09-12 09:49:15 -0400 (Sat, 12 Sep 2009)

Log Message:
-----------
* ext/oci8/extconf.rb: Fixed for ruby 1.9.2 preview1.
    (pointed by Raimonds Simanovskis)

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/extconf.rb

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2009-09-12 12:18:56 UTC (rev 355)
+++ trunk/ruby-oci8/ChangeLog	2009-09-12 13:49:15 UTC (rev 356)
@@ -1,4 +1,8 @@
 2009-09-12  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/extconf.rb: Fixed for ruby 1.9.2 preview1.
+	    (pointed by Raimonds Simanovskis)
+
+2009-09-12  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/oraconf.rb: Fixed to compile for AIX instant clients.
 	    (reported by Kazuya Teramoto)
 

Modified: trunk/ruby-oci8/ext/oci8/extconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/extconf.rb	2009-09-12 12:18:56 UTC (rev 355)
+++ trunk/ruby-oci8/ext/oci8/extconf.rb	2009-09-12 13:49:15 UTC (rev 356)
@@ -119,14 +119,12 @@
 # make ruby script before running create_makefile.
 replace_keyword(File.dirname(__FILE__) + '/../../lib/oci8.rb.in', '../../lib/oci8.rb', replace)
 
-case RUBY_VERSION
-when /^1\.9\.1/
-  so_basename = "oci8lib_191"
-when /^1\.8/
-  so_basename = "oci8lib_18"
-else
-  raise 'unsupported ruby version: ' + RUBY_VERSION
-end
+# Config::CONFIG["ruby_version"] indicates the ruby API version.
+#  1.8   - ruby 1.8.x
+#  1.9.1 - ruby 1.9.1 and 1.9.2
+#  1.9.x - ruby 1.9.x future version which will break the API compatibility
+so_basename = "oci8lib_" + Config::CONFIG["ruby_version"].gsub(/\W/, '')
+
 $defs << "-DInit_oci8lib=Init_#{so_basename}"
 $defs << "-Doci8lib=#{so_basename}"
 




More information about the ruby-oci8-commit mailing list