mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 10:03:59 +02:00
* ext/date/date_core.c: [ruby-core:38855].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ee13ed7e84
commit
e8b3d0decf
2 changed files with 10 additions and 0 deletions
|
@ -4089,6 +4089,9 @@ d_new_by_frags(VALUE klass, VALUE hash, VALUE sg)
|
|||
rb_warning("invalid start is ignored");
|
||||
}
|
||||
|
||||
if (NIL_P(hash))
|
||||
rb_raise(rb_eArgError, "invalid date");
|
||||
|
||||
if (NIL_P(ref_hash("jd")) &&
|
||||
NIL_P(ref_hash("yday")) &&
|
||||
!NIL_P(ref_hash("year")) &&
|
||||
|
@ -7853,6 +7856,9 @@ dt_new_by_frags(VALUE klass, VALUE hash, VALUE sg)
|
|||
rb_warning("invalid start is ignored");
|
||||
}
|
||||
|
||||
if (NIL_P(hash))
|
||||
rb_raise(rb_eArgError, "invalid date");
|
||||
|
||||
if (NIL_P(ref_hash("jd")) &&
|
||||
NIL_P(ref_hash("yday")) &&
|
||||
!NIL_P(ref_hash("year")) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue