Skip to content

Commit b40874b

Browse files
yahondaclaude
andcommitted
Remove obsolete ruby-oci8 2.0.3 patches and require 2.1.0+
- Remove oci8_patches.rb which patched TIMESTAMP fractional seconds for ruby-oci8 2.0.3 - Bump minimum ruby-oci8 version from 2.0.3 to 2.1.0 - Use Gem::Version for version comparison - Update README to reflect current requirements Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 39cf870 commit b40874b

3 files changed

Lines changed: 3 additions & 32 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ or include gem in Gemfile if using bundler.
135135

136136
In addition install either ruby-oci8 (for MRI/YARV) or copy Oracle JDBC driver to $JRUBY_HOME/lib (for JRuby).
137137

138-
If you are using MRI Ruby implementation then you need to install ruby-oci8 gem (version 2.0.x or 2.1.x)
138+
If you are using MRI Ruby implementation then you need to install ruby-oci8 gem (version 2.1 or higher)
139139
as well as Oracle client, e.g. [Oracle Instant Client](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html).
140140

141141
If you are using JRuby then you need to download latest [Oracle JDBC driver](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html) - either ojdbc7.jar for Java 8 and 7, ojdbc6.jar for Java 6, 7, 8 or ojdbc5.jar for Java 5. You can refer [the support matrix](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_03) for details.

lib/plsql/oci8_patches.rb

Lines changed: 0 additions & 25 deletions
This file was deleted.

lib/plsql/oci_connection.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@
1414
raise LoadError, "ERROR: ruby-plsql could not load ruby-oci8 library. #{msg}"
1515
end
1616

17-
require "plsql/oci8_patches"
18-
1917
# check ruby-oci8 version
20-
required_oci8_version = [2, 0, 3]
21-
oci8_version_ints = OCI8::VERSION.scan(/\d+/).map { |s| s.to_i }
22-
if (oci8_version_ints <=> required_oci8_version) < 0
23-
raise LoadError, "ERROR: ruby-oci8 version #{OCI8::VERSION} is too old. Please install ruby-oci8 version #{required_oci8_version.join('.')} or later."
18+
if Gem::Version.new(OCI8::VERSION) < Gem::Version.new("2.1.0")
19+
raise LoadError, "ERROR: ruby-oci8 version #{OCI8::VERSION} is too old. Please install ruby-oci8 version 2.1.0 or later."
2420
end
2521

2622
module PLSQL

0 commit comments

Comments
 (0)