Permalink
Browse files

Compatibility fix for 0.9.0 + JRuby 1.4

  • Loading branch information...
1 parent 8ccea44 commit c094dbe65c9943ff341752a7a525fdbd1f93a80b @nicksieger nicksieger committed Oct 26, 2009
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib/jdbc_adapter/version.rb
  2. +3 −2 src/java/jdbc_adapter/JdbcAdapterInternalService.java
@@ -1,5 +1,5 @@
module JdbcAdapter
module Version
- VERSION = "0.9"
+ VERSION = "0.9.0.1"
end
end
@@ -1,5 +1,5 @@
/***** BEGIN LICENSE BLOCK *****
- * Copyright (c) 2006-2008 Nick Sieger <nick@nicksieger.com>
+ * Copyright (c) 2006-2009 Nick Sieger <nick@nicksieger.com>
* Copyright (c) 2006-2007 Ola Bini <ola.bini@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -1128,7 +1128,8 @@ private static JdbcConnectionFactory getConnectionFactory(IRubyObject recv) thro
IRubyObject connection_factory = rubyApi.getInstanceVariable(recv, "@connection_factory");
JdbcConnectionFactory factory = null;
try {
- factory = (JdbcConnectionFactory) ((JavaObject) rubyApi.getInstanceVariable(connection_factory, "@java_object")).getValue();
+ factory = (JdbcConnectionFactory) JavaEmbedUtils.rubyToJava(
+ recv.getRuntime(), connection_factory, JdbcConnectionFactory.class);
} catch (Exception e) {
factory = null;
}

0 comments on commit c094dbe

Please sign in to comment.