Skip to content

Commit 2fab7f1

Browse files
authored
Merge pull request #184 from praveen-db2/master
Support for Ruby 3.3 and Rails 7.2
2 parents a95d5ab + 4debf05 commit 2fab7f1

8 files changed

Lines changed: 527 additions & 471 deletions

File tree

IBM_DB_Adapter/ibm_db/CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Change Log
22
==============
3+
2025/06/03 (IBM_DB adapter 5.6.0, driver 3.2.0)
4+
- Support for ruby 3.3 and rails 7.2.2.1
5+
36
2024/12/13 (IBM_DB adapter 5.5.1, driver 3.1.1)
47
- Support for MAC ARM64
58

IBM_DB_Adapter/ibm_db/IBM_DB.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ require 'pathname'
1010
Gem::Specification.new do |spec|
1111
# Required spec
1212
spec.name = 'ibm_db'
13-
spec.version = '5.5.1'
13+
spec.version = '5.6.0'
1414
spec.summary = 'Rails Driver and Adapter for IBM Data Servers: {DB2 on Linux/Unix/Windows, DB2 on zOS, DB2 on i5/OS, Informix (IDS)}'
1515

1616
# Optional spec
1717
spec.author = 'IBM'
1818
spec.email = 'opendev@us.ibm.com'
1919
spec.homepage = 'https://github.com/ibmdb/ruby-ibmdb'
2020
spec.required_ruby_version = '>= 2.5.0'
21-
spec.add_dependency('rubyzip', '~> 2.3.2')
21+
spec.add_dependency('rubyzip', '>= 2.3.2')
2222
spec.add_dependency('down')
23-
spec.add_dependency 'rails', '>= 7.0', '< 7.2'
24-
spec.add_dependency 'activerecord', '>= 7.0', '< 7.2'
23+
spec.add_dependency 'rails', '>= 7.0', '< 7.3'
24+
spec.add_dependency 'activerecord', '>= 7.0', '< 7.3'
2525

2626
candidates = Dir.glob("**/*")
2727
spec.files = candidates.delete_if do |item|

IBM_DB_Adapter/ibm_db/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Supported Operating Systems
1010
- IBM AIX 32/64 bit
1111
- HP-UX 32/64 bit
1212
- Sun Solaris 32/64 bit
13+
- MAC M1 ARM 64 bit
1314

1415

1516
Supported Databases

IBM_DB_Adapter/ibm_db/ext/ibm_db.c

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+----------------------------------------------------------------------+
33
| Licensed Materials - Property of IBM |
44
| |
5-
| (C) Copyright IBM Corporation 2006 - 2024 |
5+
| (C) Copyright IBM Corporation 2006 - 2025 |
66
+----------------------------------------------------------------------+
77
| Authors: Sushant Koduru, Lynh Nguyen, Kanchana Padmanabhan, |
88
| Dan Scott, Helmut Tessarek, Sam Ruby, Kellen Bombardier, |
@@ -12,7 +12,7 @@
1212
+----------------------------------------------------------------------+
1313
*/
1414

15-
#define MODULE_RELEASE "3.1.1"
15+
#define MODULE_RELEASE "3.2.0"
1616

1717
#ifdef HAVE_CONFIG_H
1818
#include "config.h"
@@ -9578,36 +9578,22 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data)
95789578
return Qnil;
95799579
}
95809580

9581-
if ((atof(row_data->str_val) - atol(row_data->str_val)) > 0)
9582-
{
9583-
strcpy(tmpStr, "BigDecimal(\'");
9584-
strcat(tmpStr, row_data->str_val);
9585-
strcat(tmpStr, "\')");
9581+
strcpy(tmpStr, "BigDecimal(\'");
9582+
strcat(tmpStr, row_data->str_val);
9583+
strcat(tmpStr, "\')");
95869584

9587-
if ( op & FETCH_ASSOC ) {
9588-
rb_hash_aset(return_value, colName, rb_eval_string(tmpStr));
9589-
}
9590-
if ( op == FETCH_INDEX ) {
9591-
rb_ary_store(return_value, i, rb_eval_string(tmpStr) );
9592-
} else if ( op == FETCH_BOTH ) {
9593-
rb_hash_aset( return_value, INT2NUM(i), rb_eval_string( tmpStr ) );
9594-
}
9595-
9596-
ruby_xfree(tmpStr);
9597-
tmpStr = NULL;
9585+
if ( op & FETCH_ASSOC ) {
9586+
rb_hash_aset(return_value, colName, rb_eval_string(tmpStr));
95989587
}
9599-
else
9600-
{
9601-
if ( op & FETCH_ASSOC ) {
9602-
rb_hash_aset(return_value, colName, LONG2NUM(atol((char *)row_data->str_val)));
9603-
}
9604-
if ( op == FETCH_INDEX ) {
9605-
rb_ary_store(return_value, i, LONG2NUM(atol((char *)row_data->str_val)));
9606-
} else if ( op == FETCH_BOTH ) {
9607-
rb_hash_aset(return_value, INT2NUM(i), LONG2NUM(atol((char *)row_data->str_val)));
9608-
}
9588+
if ( op == FETCH_INDEX ) {
9589+
rb_ary_store(return_value, i, rb_eval_string(tmpStr) );
9590+
} else if ( op == FETCH_BOTH ) {
9591+
rb_hash_aset( return_value, INT2NUM(i), rb_eval_string( tmpStr ) );
96099592
}
96109593

9594+
ruby_xfree(tmpStr);
9595+
tmpStr = NULL;
9596+
96119597
break;
96129598
case SQL_SMALLINT:
96139599
if ( op & FETCH_ASSOC ) {

0 commit comments

Comments
 (0)