date_core_num2_argc_tests.diff

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

Download (573 Bytes)

View differences:

ext/date/date_core.c (working copy)
3064 3064
{\
3065 3065
    s = s##_trunc(v##s, &fr);\
3066 3066
    if (f_nonzero_p(fr)) {\
3067
	if (argc > n)\
3067
	if (argc < n)\
3068 3068
	    rb_raise(rb_eArgError, "invalid fraction");\
3069 3069
	fr2 = fr;\
3070 3070
    }\
......
3074 3074
{\
3075 3075
    s = NUM2INT(s##_trunc(v##s, &fr));\
3076 3076
    if (f_nonzero_p(fr)) {\
3077
	if (argc > n)\
3077
	if (argc < n)\
3078 3078
	    rb_raise(rb_eArgError, "invalid fraction");\
3079 3079
	fr2 = fr;\
3080 3080
    }\