Skip to content

Commit ae5bbdc

Browse files
committed
reuse simulated rb_hash_dup in statement.c .. fixes tests under 1.8.7
1 parent 563b120 commit ae5bbdc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ext/mysql2/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static VALUE sym_id, sym_version, sym_async, sym_symbolize_keys, sym_as, sym_arr
2020
static ID intern_merge, intern_merge_bang, intern_error_number_eql, intern_sql_state_eql;
2121

2222
#ifndef HAVE_RB_HASH_DUP
23-
static VALUE rb_hash_dup(VALUE other) {
23+
VALUE rb_hash_dup(VALUE other) {
2424
return rb_funcall(rb_cHash, rb_intern("[]"), 1, other);
2525
}
2626
#endif

ext/mysql2/client.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ void init_mysql2_client();
7171
void decr_mysql2_client(mysql_client_wrapper *wrapper);
7272

7373
#endif
74+
75+
#ifndef HAVE_RB_HASH_DUP
76+
VALUE rb_hash_dup(VALUE other);
77+
#endif

0 commit comments

Comments
 (0)