Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 517852191849867c4fc16c36cd4ff78a2ffa2b0f 1 parent 91cbafa
Gerardo Santana authored

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. +1 2  ext/informixc.ec
3  ext/informixc.ec
@@ -1842,8 +1842,7 @@ make_result(cursor_t *c, VALUE record)
1842 1842 value = rb_funcall(value, s_add, 1, LONG2FIX(sign*seconds));
1843 1843
1844 1844 if (usec != 0) {
1845   - VALUE argv[2] = { INT2FIX(sign*usec), LONG2FIX(1000000L) };
1846   - VALUE frac = rb_class_new_instance(2, argv, rb_cRational);
  1845 + VALUE frac = rb_Rational(INT2FIX(sign*usec), LONG2FIX(1000000L));
1847 1846 value = rb_funcall(frac, s_add, 1, value);
1848 1847 }
1849 1848 }

0 comments on commit 5178521

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