[ruby-oci8-commit] [269] branches/ruby-oci8-1.0: * lib/oci8.rb.in: fix the problem that OraNumber#to_json returns

nobody at rubyforge.org nobody at rubyforge.org
Mon Jul 7 12:02:45 EDT 2008


Revision: 269
Author:   kubo
Date:     2008-07-07 12:02:45 -0400 (Mon, 07 Jul 2008)

Log Message:
-----------
* lib/oci8.rb.in: fix the problem that OraNumber#to_json returns
    "{}" when using Rails. (This issue is reported by Alex Moore)
    Object#to_json is added by active_support. But active_support
    doesn't know what OraNumber is.
* ext/oci8/oraconf.rb: merge chages in ruby-oci8 trunk.

Modified Paths:
--------------
    branches/ruby-oci8-1.0/ChangeLog
    branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
    branches/ruby-oci8-1.0/lib/oci8.rb.in

Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog	2008-07-06 14:26:10 UTC (rev 268)
+++ branches/ruby-oci8-1.0/ChangeLog	2008-07-07 16:02:45 UTC (rev 269)
@@ -1,3 +1,10 @@
+2008-07-07  KUBO Takehiro  <kubo at jiubao.org>
+	* lib/oci8.rb.in: fix the problem that OraNumber#to_json returns
+	    "{}" when using Rails. (This issue is reported by Alex Moore)
+	    Object#to_json is added by active_support. But active_support
+	    doesn't know what OraNumber is.
+	* ext/oci8/oraconf.rb: merge chages in ruby-oci8 trunk.
+
 2008-07-05  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/oraconf.rb: prints more information on checking
 	   LD_LIBRARY_PATH.

Modified: branches/ruby-oci8-1.0/ext/oci8/oraconf.rb
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/oraconf.rb	2008-07-06 14:26:10 UTC (rev 268)
+++ branches/ruby-oci8-1.0/ext/oci8/oraconf.rb	2008-07-07 16:02:45 UTC (rev 269)
@@ -247,7 +247,7 @@
       print <<EOS
 ---------------------------------------------------
 error messages:
-#{$!.to_str}
+#{$!.to_s}
 ---------------------------------------------------
 See:
  * http://ruby-oci8.rubyforge.org/#{lang}/HowToInstall.html
@@ -443,7 +443,8 @@
   def check_ruby_header
     print "checking for ruby header... "
     STDOUT.flush
-    unless File.exist?("#{Config::CONFIG['archdir']}/ruby.h")
+    rubyhdrdir = Config::CONFIG["rubyhdrdir"] || Config::CONFIG['archdir']
+    unless File.exist?(rubyhdrdir + '/ruby.h')
       puts "ng"
       if RUBY_PLATFORM =~ /darwin/ and File.exist?("#{Config::CONFIG['archdir']}/../universal-darwin8.0/ruby.h")
         raise <<EOS

Modified: branches/ruby-oci8-1.0/lib/oci8.rb.in
===================================================================
--- branches/ruby-oci8-1.0/lib/oci8.rb.in	2008-07-06 14:26:10 UTC (rev 268)
+++ branches/ruby-oci8-1.0/lib/oci8.rb.in	2008-07-07 16:02:45 UTC (rev 269)
@@ -1305,6 +1305,10 @@
       out.scalar(taguri, self.to_s, :plain)
     end
   end
+
+  def to_json(options=nil) # :nodoc:
+    to_s
+  end
 end
 
 




More information about the ruby-oci8-commit mailing list