summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/syck/rubyext.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 34b9e1b..0626698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 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 );