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 | |
| 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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/syck/rubyext.c | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Jan 13 16:53:25 2004 why the lucky stiff <why@ruby-lang.org> + + * ext/syck/rubyext.c: omission of Date library code caused + test suite failure. [ruby-core:2251] + Tue Jan 13 16:50:03 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tk.rb: use $0 as the default application class name. 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 ); } |
