Skip to content

Commit 1a0a124

Browse files
nyaxtjustincase
authored andcommitted
compiles on ruby 1.8.7 / but test fail
1 parent 1281d46 commit 1a0a124

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ext/mysql2/statement.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ static void rb_raise_mysql2_stmt_error(VALUE self) {
5656
GET_STATEMENT(self);
5757
{
5858
GET_CLIENT(stmt_wrapper->client);
59+
#ifdef HAVE_RUBY_ENCODING_H
5960
conn_enc = rb_to_encoding(wrapper->encoding);
61+
#endif
6062
}
6163

6264
rb_raise_mysql2_stmt_error2(stmt_wrapper->stmt

spec/mysql2/statement_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
result.to_a.should == [{"整数"=>1}]
126126
end
127127

128-
end
128+
end if defined? Encoding
129129

130130
context "streaming result" do
131131
it "should be able to stream query result" do

0 commit comments

Comments
 (0)