diff options
| author | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-13 07:57:33 +0000 |
|---|---|---|
| committer | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-13 07:57:33 +0000 |
| commit | 8804e1b42c8bf6e296d62be7dadbfa9ea87f8454 (patch) | |
| tree | ece38cb052e39c1664d9b21c9bf6f8545981e703 /ext/syck | |
| parent | 1fb71c92e4f2e48014345b496ed70df3c3e6345c (diff) | |
| download | ruby-8804e1b42c8bf6e296d62be7dadbfa9ea87f8454.tar.gz ruby-8804e1b42c8bf6e296d62be7dadbfa9ea87f8454.tar.xz ruby-8804e1b42c8bf6e296d62be7dadbfa9ea87f8454.zip | |
* ext/syck/rubyext.c: omission of Date library code caused
test suite failure. [ruby-core:2251]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
| -rw-r--r-- | ext/syck/rubyext.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 9bce25360..36ef177ae 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -521,6 +521,14 @@ yaml_org_handler( n, ref ) ptr += 2; while ( !ISDIGIT( *ptr ) ) ptr++; day = INT2FIX(strtol(ptr, NULL, 10)); + + if ( !cDate ) { + /* + * Load Date module + */ + rb_require( "date" ); + cDate = rb_const_get( rb_cObject, rb_intern("Date") ); + } obj = rb_funcall( cDate, s_new, 3, year, mon, day ); } |
