diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 04:38:23 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-10 04:38:23 +0000 |
| commit | 889b7bfce707a370e200a09dbb2a108f13f8bc6e (patch) | |
| tree | 2c72a4c9b1ea68ec2b9343273b48b384a0e7719b | |
| parent | e107a0320950aed603dc8a4acdb87a3ecc58161c (diff) | |
| download | ruby-889b7bfce707a370e200a09dbb2a108f13f8bc6e.tar.gz ruby-889b7bfce707a370e200a09dbb2a108f13f8bc6e.tar.xz ruby-889b7bfce707a370e200a09dbb2a108f13f8bc6e.zip | |
* ext/syck/rubyext.c (syck_resolver_transfer): should be able to load
!ruby/object:Bignum syntax 1.8.3 dumped. [ruby-core:6159] (written
by akira yamada)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/syck/rubyext.c | 10 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Jan 10 13:30:34 2006 akira yamada <akira@ruby-lang.org> + + * ext/syck/rubyext.c (syck_resolver_transfer): should be able to load + !ruby/object:Bignum syntax 1.8.3 dumped. [ruby-core:6159] + Tue Jan 10 12:00:48 2006 Aaron Schrab <aaron @nospam@ schrab.com> * lib/yaml/rubytypes.rb (Symbol#yaml_new): YAML loading of quoted diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 272cfd257..a4717e4f3 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -1157,7 +1157,15 @@ syck_resolver_transfer( self, type, val ) } else if ( !NIL_P( target_class ) ) { - obj = rb_obj_alloc( subclass ); + if ( subclass == rb_cBignum ) + { + obj = rb_str2inum( val, 10 ); /* for yaml dumped by 1.8.3 [ruby-core:6159] */ + } + else + { + obj = rb_obj_alloc( subclass ); + } + if ( rb_respond_to( obj, s_yaml_initialize ) ) { rb_funcall( obj, s_yaml_initialize, 2, type, val ); |
