summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-10 04:38:23 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-10 04:38:23 +0000
commit399d08df016ed7139e45bba96c99b14094fb6326 (patch)
tree2c72a4c9b1ea68ec2b9343273b48b384a0e7719b /ext
parent76421fa998278cb2510999b7835a34d5f543bcb9 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/syck/rubyext.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 272cfd2..a4717e4 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 );