Project

General

Profile

Bug #4848 » date_core_num2_argc_tests.diff

Patch to change 'argc > n' to 'argc < n' in num2num_with_frac and num2int_with_frac - philr (Phil  ), 06/07/2011 06:01 AM

View differences:

ext/date/date_core.c (working copy)
{\
s = s##_trunc(v##s, &fr);\
if (f_nonzero_p(fr)) {\
if (argc > n)\
if (argc < n)\
rb_raise(rb_eArgError, "invalid fraction");\
fr2 = fr;\
}\
......
{\
s = NUM2INT(s##_trunc(v##s, &fr));\
if (f_nonzero_p(fr)) {\
if (argc > n)\
if (argc < n)\
rb_raise(rb_eArgError, "invalid fraction");\
fr2 = fr;\
}\
    (1-1/1)