[ruby-oci8-commit] [560] trunk/ruby-oci8: suppress warning: assigned but unused variable.

nobody at rubyforge.org nobody at rubyforge.org
Sun Mar 3 06:09:22 UTC 2013


Revision: 560
Author:   kubo
Date:     2013-03-03 06:09:22 +0000 (Sun, 03 Mar 2013)
Log Message:
-----------
suppress warning: assigned but unused variable.
use RbConfig::CONFIG instead of obsolete.

Modified Paths:
--------------
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/lib/oci8/object.rb
    trunk/ruby-oci8/lib/oci8.rb.in
    trunk/ruby-oci8/test/test_bind_time.rb
    trunk/ruby-oci8/test/test_metadata.rb
    trunk/ruby-oci8/test/test_object.rb
    trunk/ruby-oci8/test/test_oci8.rb

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/ChangeLog	2013-03-03 06:09:22 UTC (rev 560)
@@ -1,4 +1,11 @@
 2013-03-03  KUBO Takehiro  <kubo at jiubao.org>
+	* lib/oci8.rb.in: use RbConfig::CONFIG instead of obsolete
+	    constant Config::CONFIG.
+	* lib/oci8/object.rb, test/test_bind_time.rb, test/test_metadata.rb
+	  test/test_object.rb, test/test_oci8.rb:
+	    suppress warning: assigned but unused variable
+
+2013-03-03  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/lob.c, ext/oci8/oci8.c, ext/oci8/oci8.h:
 	    refactor oci8_lob_t.
 

Modified: trunk/ruby-oci8/lib/oci8/object.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/object.rb	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/lib/oci8/object.rb	2013-03-03 06:09:22 UTC (rev 560)
@@ -394,7 +394,6 @@
       @instance_methods = {}
       metadata.type_methods.each_with_index do |type_method, i|
         next if type_method.is_constructor? or type_method.is_destructor?
-        args = type_method.arguments
 
         result_type = nil
         if type_method.has_result?

Modified: trunk/ruby-oci8/lib/oci8.rb.in
===================================================================
--- trunk/ruby-oci8/lib/oci8.rb.in	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/lib/oci8.rb.in	2013-03-03 06:09:22 UTC (rev 560)
@@ -82,7 +82,7 @@
 
 if OCI8::VERSION != '@@OCI8_MODULE_VERSION@@'
   require 'rbconfig'
-  so_name = so_basename + "." + Config::CONFIG['DLEXT']
+  so_name = so_basename + "." + RbConfig::CONFIG['DLEXT']
   raise "VERSION MISMATCH! #{so_name} version is #{OCI8::VERSION}, but oci8.rb version is @@OCI8_MODULE_VERSION@@."
 end
 

Modified: trunk/ruby-oci8/test/test_bind_time.rb
===================================================================
--- trunk/ruby-oci8/test/test_bind_time.rb	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/test/test_bind_time.rb	2013-03-03 06:09:22 UTC (rev 560)
@@ -83,8 +83,8 @@
 
   def test_get_day
     cursor = @conn.parse("BEGIN :time := TO_DATE('200101' || TO_CHAR(:day, 'FM00'), 'YYYYMMDD'); END;")
-    day_in = cursor.bind_param(:day, Fixnum)
-    time_out = cursor.bind_param(:time, Time)
+    cursor.bind_param(:day, Fixnum)
+    cursor.bind_param(:time, Time)
     DAY_CHECK_TARGET.each do |i|
       # set time via oracle.
       cursor[:day] = i;

Modified: trunk/ruby-oci8/test/test_metadata.rb
===================================================================
--- trunk/ruby-oci8/test/test_metadata.rb	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/test/test_metadata.rb	2013-03-03 06:09:22 UTC (rev 560)
@@ -894,7 +894,6 @@
     assert_equal(2, desc[0].arguments.length)
     assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
 
-    descs = @conn.describe_package('test_pkg').subprograms
     assert_instance_of(OCI8::Metadata::Procedure, desc[1])
     assert_equal(nil, desc[1].obj_id)
     assert_equal('TEST_PROC', desc[1].obj_name)
@@ -994,7 +993,6 @@
     assert_equal(3, desc[0].arguments.length)
     assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
 
-    descs = @conn.describe_package('test_pkg').subprograms
     assert_instance_of(OCI8::Metadata::Function, desc[1])
     assert_equal(nil, desc[1].obj_id)
     assert_equal('TEST_FUNC', desc[1].obj_name)

Modified: trunk/ruby-oci8/test/test_object.rb
===================================================================
--- trunk/ruby-oci8/test/test_object.rb	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/test/test_object.rb	2013-03-03 06:09:22 UTC (rev 560)
@@ -151,7 +151,6 @@
         @obj_ary_of_ary_val = []
 #        @date_array_val = []
         0.upto(2) do |i|
-          ival = @n.round
           val = (@n + i).to_s
           val = $` if /.0$/ =~ val
           @int_array_val[i] = @int_val + i

Modified: trunk/ruby-oci8/test/test_oci8.rb
===================================================================
--- trunk/ruby-oci8/test/test_oci8.rb	2013-03-03 05:45:36 UTC (rev 559)
+++ trunk/ruby-oci8/test/test_oci8.rb	2013-03-03 06:09:22 UTC (rev 560)
@@ -202,7 +202,7 @@
     plsql.bind_param(':cursor', nil, OCI8::Cursor)
     plsql.exec
     cursor = plsql[':cursor']
-    cursor.define(5, Time) # define 5th column as Time
+    cursor.define(5, DateTime) # define 5th column as DateTime
     cursor.define(6, Date) # define 6th column as Date
     cursor.define(7, Integer) # define 7th column as Integer
     cursor.define(8, Bignum) # define 8th column as Integer
@@ -221,7 +221,7 @@
         tm = Time.local(2000 + i, 8, 3, 23, 59, 59)
 	dt = Date.civil(2000 + i, 8, 3)
 	assert_equal(tm, rv[3])
-	assert_equal(tm, rv[4])
+	assert_equal(dttm, rv[4])
 	assert_equal(dt, rv[5])
       end
       assert_equal(i, rv[6])



More information about the ruby-oci8-commit mailing list