Skip to content
Browse files

Ruby 1.9.x compatibility (for creating an instance of Rational)

  • Loading branch information...
1 parent 91cbafa commit 517852191849867c4fc16c36cd4ff78a2ffa2b0f @santana committed Apr 11, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 ext/informixc.ec
View
3 ext/informixc.ec
@@ -1842,8 +1842,7 @@ make_result(cursor_t *c, VALUE record)
value = rb_funcall(value, s_add, 1, LONG2FIX(sign*seconds));
if (usec != 0) {
- VALUE argv[2] = { INT2FIX(sign*usec), LONG2FIX(1000000L) };
- VALUE frac = rb_class_new_instance(2, argv, rb_cRational);
+ VALUE frac = rb_Rational(INT2FIX(sign*usec), LONG2FIX(1000000L));
value = rb_funcall(frac, s_add, 1, value);
}
}

0 comments on commit 5178521

Please sign in to comment.
Something went wrong with that request. Please try again.