Title: [1001] trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_mssql.rb: JRUBY-2011:
One more type_cast fix -- value is not always a string
- Revision
- 1001
- Author
- nicksieger
- Date
- 2008-05-20 23:13:18 -0400 (Tue, 20 May 2008)
Log Message
JRUBY-2011: One more type_cast fix -- value is not always a string
Modified Paths
Diff
Modified: trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_mssql.rb (1000 => 1001)
--- trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_mssql.rb 2008-05-20 13:43:00 UTC (rev 1000)
+++ trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_mssql.rb 2008-05-21 03:13:18 UTC (rev 1001)
@@ -50,7 +50,7 @@
end
def type_cast(value)
- return nil if value.nil? || value.downcase == "(null)"
+ return nil if value.nil? || value == "(null)" || value == "(NULL)"
case type
when :string then unquote_string value
when :integer then unquote(value).to_i rescue value ? 1 : 0
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel