mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
date_core.c: remove assert
* ext/date/date_core.c (decode_jd): do not assert type of argument. just try to convert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
63be9ed5c0
commit
ce19b495d1
1 changed files with 0 additions and 2 deletions
|
@ -1360,10 +1360,8 @@ encode_year(VALUE nth, int y, double style,
|
||||||
static void
|
static void
|
||||||
decode_jd(VALUE jd, VALUE *nth, int *rjd)
|
decode_jd(VALUE jd, VALUE *nth, int *rjd)
|
||||||
{
|
{
|
||||||
assert(RB_INTEGER_TYPE_P(jd));
|
|
||||||
*nth = f_idiv(jd, INT2FIX(CM_PERIOD));
|
*nth = f_idiv(jd, INT2FIX(CM_PERIOD));
|
||||||
if (f_zero_p(*nth)) {
|
if (f_zero_p(*nth)) {
|
||||||
assert(FIXNUM_P(jd));
|
|
||||||
*rjd = FIX2INT(jd);
|
*rjd = FIX2INT(jd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue