Title: [629] trunk/activerecord-jdbc/src/java/JDBCDerbySpec.java: Improve performance of quoting by not using getClassFromPath
- Revision
- 629
- Author
- olabini
- Date
- 2007-06-14 10:20:27 -0400 (Thu, 14 Jun 2007)
Log Message
Improve performance of quoting by not using getClassFromPath
Modified Paths
Diff
Modified: trunk/activerecord-jdbc/src/java/JDBCDerbySpec.java (628 => 629)
--- trunk/activerecord-jdbc/src/java/JDBCDerbySpec.java 2007-06-14 13:52:16 UTC (rev 628)
+++ trunk/activerecord-jdbc/src/java/JDBCDerbySpec.java 2007-06-14 14:20:27 UTC (rev 629)
@@ -90,7 +90,7 @@
IRubyObject type = (col.isNil()) ? col : col.callMethod(runtime.getCurrentContext(),"type");
if(value instanceof RubyString ||
- value.isKindOf(runtime.getClassFromPath("ActiveSupport::Multibyte::Chars"))) {
+ value.isKindOf((RubyModule)(((RubyModule)((RubyModule)runtime.getModule("ActiveSupport")).getConstant("Multibyte")).getConstantAt("Chars")))) {
RubyString svalue = RubyString.objAsString(value);
if(type == runtime.newSymbol("binary") && col.getType().respondsTo("string_to_binary")) {
return quote_string_with_surround(runtime, "'", (RubyString)(col.getType().callMethod(runtime.getCurrentContext(), "string_to_binary", svalue)), "'");
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel