|
2 | 2 | +----------------------------------------------------------------------+ |
3 | 3 | | Licensed Materials - Property of IBM | |
4 | 4 | | | |
5 | | - | (C) Copyright IBM Corporation 2006 - 2024 | |
| 5 | + | (C) Copyright IBM Corporation 2006 - 2025 | |
6 | 6 | +----------------------------------------------------------------------+ |
7 | 7 | | Authors: Sushant Koduru, Lynh Nguyen, Kanchana Padmanabhan, | |
8 | 8 | | Dan Scott, Helmut Tessarek, Sam Ruby, Kellen Bombardier, | |
|
12 | 12 | +----------------------------------------------------------------------+ |
13 | 13 | */ |
14 | 14 |
|
15 | | -#define MODULE_RELEASE "3.1.1" |
| 15 | +#define MODULE_RELEASE "3.2.0" |
16 | 16 |
|
17 | 17 | #ifdef HAVE_CONFIG_H |
18 | 18 | #include "config.h" |
@@ -9578,36 +9578,22 @@ static VALUE _ruby_ibm_db_bind_fetch_helper(ibm_db_fetch_helper_args *data) |
9578 | 9578 | return Qnil; |
9579 | 9579 | } |
9580 | 9580 |
|
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, "\')"); |
9586 | 9584 |
|
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)); |
9598 | 9587 | } |
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 ) ); |
9609 | 9592 | } |
9610 | 9593 |
|
| 9594 | + ruby_xfree(tmpStr); |
| 9595 | + tmpStr = NULL; |
| 9596 | + |
9611 | 9597 | break; |
9612 | 9598 | case SQL_SMALLINT: |
9613 | 9599 | if ( op & FETCH_ASSOC ) { |
|
0 commit comments