edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C475021
File: BuiltinsOps.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C475021  (server)    6/24/2008 10:56 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;YamlParse2
@@ -22,6 +22,7 @@
 using Ruby.Runtime;
 using System.Scripting.Runtime;
 using System.Scripting;
+using Microsoft.Scripting.Math;
 
 namespace Ruby.StandardLibrary.Yaml {
 
@@ -222,28 +223,43 @@
         }
 
         [RubyMethod("taguri")]
-        public static MutableString TagUri(CodeContext/*!*/ context, object/*!*/ self) {
-            switch (Type.GetTypeCode(self.GetType())) {                
-                case TypeCode.Byte:
-                case TypeCode.SByte:
-                case TypeCode.Int16:
-                case TypeCode.UInt16:
-                case TypeCode.Int32:
-                case TypeCode.UInt32:
-                case TypeCode.Int64:
-                case TypeCode.UInt64:
-                case TypeCode.Char:
-                    return MutableString.Create("tag:yaml.org,2002:int");                    
-                case TypeCode.Single:
-                case TypeCode.Double:
-                case TypeCode.Decimal:
-                    return MutableString.Create("tag:yaml.org,2002:float");                                    
-                default:
-                    return YamlObjectOps.TagUri(context, self);
-            }
+        public static MutableString TagUri(CodeContext/*!*/ context, object self) {            
+            return MutableString.Create("tag:yaml.org,2002:int");            
         }
     }
 
+    [RubyModule(Extends = typeof(BigInteger))]
+    public static class YamlBigIntegerOps {        
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(CodeContext/*!*/ context, [NotNull]BigInteger self) {     
+            return MutableString.Create("tag:yaml.org,2002:int:Bignum");            
+        }
+    }
+
+    [RubyModule(Extends = typeof(float))]    
+    public static class YamlFloatOps {
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(CodeContext/*!*/ context, object self) {            
+            return MutableString.Create("tag:yaml.org,2002:float");
+        }
+    }
+
+    [RubyModule(Extends = typeof(double))]
+    public static class YamlDoubleOps {
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(CodeContext/*!*/ context, object self) {
+            return MutableString.Create("tag:yaml.org,2002:float");
+        }
+    }
+
+    [RubyModule(Extends = typeof(decimal))]
+    public static class YamlDecimalOps {
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(CodeContext/*!*/ context, object self) {
+            return MutableString.Create("tag:yaml.org,2002:float");
+        }
+    }
+
     [RubyModule(Extends = typeof(Range))]
     public static class YamlRangeOps {
         private static readonly DynamicSite<object, object> _Begin = DynamicSite<object, object>.Create(LibrarySites.InstanceCallAction("begin"));
@@ -313,4 +329,12 @@
             return rep.Scalar(context, self, null);
         }
     }
+
+    [RubyClass(Extends = typeof(Node))]
+    public static class YamlNodeOps {
+        [RubyMethod("transform")]
+        public static object Transform(CodeContext/*!*/ context, Node/*!*/ self) {
+            return new RubyConstructor(context, new SimpleNodeProvider(self)).GetData();
+        }
+    }
 }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C475196
File: Initializer.Generated.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C475196  (server)    6/24/2008 9:57 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;YamlParse2
@@ -5,6 +5,7 @@
         protected override void LoadModules() {
             
             
+            ExtendModule(typeof(Microsoft.Scripting.Math.BigInteger), new System.Action<Ruby.Builtins.RubyModule>(LoadMicrosoft__Scripting__Math__BigInteger_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendModule(typeof(Ruby.Builtins.FalseClass), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__FalseClass_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendClass(typeof(Ruby.Builtins.Hash), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__Hash_Instance), null, Ruby.Builtins.RubyModule.EmptyArray, null);
             ExtendModule(typeof(Ruby.Builtins.MutableString), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__MutableString_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
@@ -15,10 +16,14 @@
             ExtendModule(typeof(Ruby.Builtins.RubyRegex), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__RubyRegex_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendModule(typeof(Ruby.Builtins.RubyStruct), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__RubyStruct_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendModule(typeof(Ruby.Builtins.TrueClass), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__Builtins__TrueClass_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
+            ExtendClass(typeof(Ruby.StandardLibrary.Yaml.Node), new System.Action<Ruby.Builtins.RubyModule>(LoadRuby__StandardLibrary__Yaml__Node_Instance), null, Ruby.Builtins.RubyModule.EmptyArray, null);
+            ExtendModule(typeof(System.Decimal), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Decimal_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
+            ExtendModule(typeof(System.Double), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Double_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendModule(typeof(System.Exception), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Exception_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendClass(typeof(System.Object), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Object_Instance), null, Ruby.Builtins.RubyModule.EmptyArray, null);
             ExtendModule(typeof(System.Scripting.None), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Scripting__None_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             ExtendModule(typeof(System.Scripting.SymbolId), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Scripting__SymbolId_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
+            ExtendModule(typeof(System.Single), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Single_Instance), null, Ruby.Builtins.RubyModule.EmptyArray);
             Ruby.Builtins.RubyModule def1 = DefineGlobalModule("YAML", typeof(Ruby.StandardLibrary.Yaml.RubyYaml), null, new System.Action<Ruby.Builtins.RubyModule>(LoadYAML_Class), Ruby.Builtins.RubyModule.EmptyArray);
             Ruby.Builtins.RubyClass def2 = DefineClass("YAML::Stream", typeof(Ruby.StandardLibrary.Yaml.YamlStream), Context.ObjectClass, new System.Action<Ruby.Builtins.RubyModule>(LoadYAML__Stream_Instance), null, Ruby.Builtins.RubyModule.EmptyArray, new System.Delegate[] {
                 new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.Hash, Ruby.StandardLibrary.Yaml.YamlStream>(Ruby.StandardLibrary.Yaml.RubyYaml.YamlStreamOps.CreateStream),
@@ -26,6 +31,14 @@
             def1.SetConstant("Stream", def2);
         }
         
+        private void LoadMicrosoft__Scripting__Math__BigInteger_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Microsoft.Scripting.Math.BigInteger, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlBigIntegerOps.TagUri),
+            });
+            
+        }
+        
         private void LoadRuby__Builtins__FalseClass_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
             
             module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
@@ -142,6 +155,30 @@
             
         }
         
+        private void LoadRuby__StandardLibrary__Yaml__Node_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("transform", 0x9, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.StandardLibrary.Yaml.Node, System.Object>(Ruby.StandardLibrary.Yaml.YamlNodeOps.Transform),
+            });
+            
+        }
+        
+        private void LoadSystem__Decimal_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, System.Object, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlDecimalOps.TagUri),
+            });
+            
+        }
+        
+        private void LoadSystem__Double_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, System.Object, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlDoubleOps.TagUri),
+            });
+            
+        }
+        
         private void LoadSystem__Exception_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
             
             module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
@@ -198,6 +235,14 @@
             
         }
         
+        private void LoadSystem__Single_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, System.Object, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlFloatOps.TagUri),
+            });
+            
+        }
+        
         private void LoadYAML_Class(Ruby.Builtins.RubyModule/*!*/ module) {
             
             module.DefineLibraryMethod("dump", 0x12, new System.Delegate[] {
@@ -216,6 +261,10 @@
                 new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, Ruby.Runtime.BlockParam, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.EachDocument),
             });
             
+            module.DefineLibraryMethod("each_node", 0x12, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, Ruby.Runtime.BlockParam, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.ParseDocuments),
+            });
+            
             module.DefineLibraryMethod("load", 0x12, new System.Delegate[] {
                 new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.Load),
             });
@@ -232,6 +281,18 @@
                 new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.LoadStream),
             });
             
+            module.DefineLibraryMethod("parse", 0x12, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.Parse),
+            });
+            
+            module.DefineLibraryMethod("parse_documents", 0x12, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, Ruby.Runtime.BlockParam, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.ParseDocuments),
+            });
+            
+            module.DefineLibraryMethod("parse_file", 0x12, new System.Delegate[] {
+                new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.ParseFile),
+            });
+            
             module.DefineLibraryMethod("quick_emit_node", 0x12, new System.Delegate[] {
                 new System.Scripting.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, Ruby.Runtime.BlockParam, System.Object, System.Object[], System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.QuickEmitNode),
             });
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/IronRuby.Libraries.Yaml.csproj;C469847
File: IronRuby.Libraries.Yaml.csproj
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/IronRuby.Libraries.Yaml.csproj;C469847  (server)    6/24/2008 2:55 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/IronRuby.Libraries.Yaml.csproj;YamlParse2
@@ -44,6 +44,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="BuiltinsOps.cs" />
+    <Compile Include="Engine\NodeProvider.cs" />
     <Compile Include="Initializer.Generated.cs" />
     <Compile Include="MutableStringReader.cs" />
     <Compile Include="MutableStringWriter.cs" />
@@ -66,7 +67,6 @@
     <Compile Include="Engine\Serializer.cs" />
     <Compile Include="Engine\Tokens.cs" />
     <Compile Include="Engine\YamlConfig.cs" />
-    <Compile Include="Engine\YamlDocument.cs" />
     <Compile Include="RubyConstructor.cs">
       <SubType>Code</SubType>
     </Compile>
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/IronRuby.Libraries.Yaml.csproj.vspscc;C443395
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C475196
File: RubyConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C475196  (server)    6/24/2008 4:47 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;YamlParse2
@@ -108,8 +108,8 @@
             return result;
         }
 
-        public RubyConstructor(CodeContext/*!*/ context, Composer composer)
-            : base(composer) {
+        public RubyConstructor(CodeContext/*!*/ context, NodeProvider/*!*/ nodeProvider)
+            : base(nodeProvider) {
             _context = context;
             AddConstructor("tag:yaml.org,2002:str", ConstructRubyScalar);
             AddConstructor("tag:yaml.org,2002:seq", ConstructRubySeq);
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;C475196
File: RubyYaml.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;C475196  (server)    6/24/2008 2:12 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;YamlParse2
@@ -41,6 +41,7 @@
         private static readonly SymbolId _Stream = SymbolTable.StringToId("Stream");
         private static readonly SymbolId _TaggedClasses = SymbolTable.StringToId("tagged_classes");
 
+
         [RubyMethod("tagged_classes", RubyMethodAttributes.PrivateSingleton)]
         public static object GetTaggedClasses(CodeContext/*!*/ context, RubyModule/*!*/ self) {
             object taggedClasses;
@@ -104,7 +105,7 @@
             } else {
                 writer = new MutableStringWriter();
             }
-            YamlOptions cfg = YamlDocument.DefaultOptions;
+            YamlOptions cfg = YamlOptions.DefaultOptions;
             using (Serializer s = new Serializer(new Emitter(writer, cfg), cfg)) {
                 RubyRepresenter r = new RubyRepresenter(context, s, cfg);
                 foreach (object obj in objs) {
@@ -148,7 +149,8 @@
                 throw new LocalJumpError("no block given");
             }
             foreach (object obj in rc) {
-                _Block.Invoke(context, block, obj);
+                object result = _Block.Invoke(context, block, obj);
+                if (block.BlockJumped(result)) return result;
             }
             return null;
         }
@@ -164,6 +166,42 @@
             return stream;
         }
 
+        [RubyMethod("parse", RubyMethodAttributes.PrivateSingleton)]
+        public static object Parse(CodeContext/*!*/ context, RubyModule self, object io) {
+            try {
+                foreach (object obj in MakeComposer(CheckYamlPort(io))) {
+                    return obj;
+                }
+                return null;
+            } finally {
+                RubyIO rio = io as RubyIO;
+                if (rio != null) {
+                    rio.Close();
+                }
+            }
+        }
+        
+        [RubyMethod("parse_documents", RubyMethodAttributes.PrivateSingleton)]
+        [RubyMethod("each_node", RubyMethodAttributes.PrivateSingleton)]
+        public static object ParseDocuments(CodeContext/*!*/ context, RubyModule self, BlockParam block, object io) {
+            Composer c = MakeComposer(CheckYamlPort(io));
+            if (block == null && c.CheckNode()) {
+                throw new LocalJumpError("no block given");
+            }
+            foreach (object obj in c) {
+                object result = _Block.Invoke(context, block, obj);
+                if (block.BlockJumped(result)) return result;
+            }
+            return null;
+        }
+
+        [RubyMethod("parse_file", RubyMethodAttributes.PrivateSingleton)]
+        public static object ParseFile(CodeContext/*!*/ context, RubyModule self, object arg) {
+            RubyClass file = RubyUtils.GetExecutionContext(context).GetClass(typeof(RubyFile));
+            object io = RubyIOOps.Open(context, file, null, arg, MutableString.Create("r"));
+            return Parse(context, self, io as RubyIO);
+        }
+
         [RubyMethod("dump_stream", RubyMethodAttributes.PrivateSingleton)]
         public static object DumpStream(CodeContext context, RubyModule self, [NotNull]params object[] args) {
             object streamClass = RubyUtils.GetConstant(context, self as RubyModule, _Stream, false);            
@@ -184,13 +222,23 @@
 
         [RubyMethod("tagurize", RubyMethodAttributes.PrivateSingleton)]
         public static object Tagurize(CodeContext context, RubyModule self, object arg) {
-            return RubyRepresenter.TagUri(context, arg);
+            if (arg == null) {
+                return null;
+            }
+            if (RubySites.RespondTo(context, arg, "to_str")) {
+                return MutableString.Create("tag:yaml.org,2002:").Append(Protocols.ConvertToString(context, arg));
+            }
+            return arg;
         }
 
         private static RubyConstructor/*!*/ MakeConstructor(CodeContext/*!*/ context, TextReader/*!*/ reader) {
-            return new RubyConstructor(context, new Composer(new Parser(new Scanner(reader), YamlDocument.DefaultOptions.Version)));
+            return new RubyConstructor(context, MakeComposer(reader));
         }
 
+        private static Composer/*!*/ MakeComposer(TextReader/*!*/ reader) {
+            return new Composer(new Parser(new Scanner(reader), YamlOptions.DefaultOptions.Version));
+        }
+
         private static TextReader CheckYamlPort(object port) {
             MutableString ms = port as MutableString;
             if (ms != null) {
@@ -273,6 +321,6 @@
                 .Append('>');
                 return result;
             }
-        }
+        }        
     }
 }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;C475196
File: BaseConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;C475196  (server)    6/24/2008 4:43 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;YamlParse2
@@ -50,10 +50,10 @@
         private static object _NullObjectKey = new object();
         
         private readonly Dictionary<Node, List<RecursiveFixer>> _recursiveObjects = new Dictionary<Node, List<RecursiveFixer>>();
-        private readonly Composer _composer;
+        private readonly NodeProvider _nodeProvider;
 
-        public BaseConstructor(Composer composer) {
-            _composer = composer;
+        public BaseConstructor(NodeProvider/*!*/ nodeProvider) {
+            _nodeProvider = nodeProvider;
         }
 
         public static object NullObjectKey {
@@ -97,14 +97,13 @@
             _yamlMultiRegexps.Add(tagPrefix, new Regex("^" + tagPrefix, RegexOptions.Compiled));
         }
 
-
         public bool CheckData() {
-            return _composer.CheckNode();
+            return _nodeProvider.CheckNode();
         }
 
         public object GetData() {
-            if(_composer.CheckNode()) {
-                Node node = _composer.GetNode();
+            if (_nodeProvider.CheckNode()) {
+                Node node = _nodeProvider.GetNode();
                 if(null != node) {
                     return ConstructDocument(node);
                 }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Composer.cs;C443395
File: Composer.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Composer.cs;C443395  (server)    6/24/2008 4:44 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Composer.cs;YamlParse2
@@ -21,23 +21,15 @@
 
 namespace Ruby.StandardLibrary.Yaml {
    
-    public class Composer : IEnumerable<Node> {
+    public class Composer : NodeProvider {
         private readonly Parser _parser;
         private readonly Dictionary<string, Node> _anchors;
 
         public Composer(Parser parser) {
             _parser = parser;
             _anchors = new Dictionary<string, Node>();
-        }
+        }       
 
-        public bool CheckNode() {
-            return !(_parser.PeekEvent() is StreamEndEvent);
-        }
-
-        public Node GetNode() {
-            return CheckNode() ? ComposeDocument() : (Node)null;
-        }
-
         private Node ComposeDocument() {
             if (_parser.PeekEvent() is StreamStartEvent) {
                 //Drop STREAM-START event
@@ -120,17 +112,15 @@
             return result;
         }
 
-        #region IEnumerable<Node> Members
+        #region NodeProvider Members
 
-        public IEnumerator<Node> GetEnumerator() {
-            while (CheckNode()) {
-                yield return GetNode();
-            }
+        public override bool CheckNode() {
+            return !(_parser.PeekEvent() is StreamEndEvent);
         }
 
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
-            return GetEnumerator();
-        }
+        public override Node GetNode() {
+            return CheckNode() ? ComposeDocument() : (Node)null;
+        }        
 
         #endregion
     }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Constructor.cs;C443395
File: Constructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Constructor.cs;C443395  (server)    6/24/2008 4:44 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Constructor.cs;YamlParse2
@@ -63,8 +63,8 @@
             _yamlMultiRegexps.Add(tagPrefix, new Regex("^" + tagPrefix, RegexOptions.Compiled));
         }
 
-        public Constructor(Composer composer)
-            : base(composer) {
+        public Constructor(NodeProvider/*!*/ nodeProvider)
+            : base(nodeProvider) {
         }
 
     }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/LiteralParser.cs;C443395
File: LiteralParser.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/LiteralParser.cs;C443395  (server)    6/24/2008 12:50 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/LiteralParser.cs;YamlParse2
@@ -16,6 +16,8 @@
  ***** END LICENSE BLOCK *****/
 
 using System;
+using Microsoft.Scripting.Math;
+using Ruby.Compiler;
 
 namespace Ruby.StandardLibrary.Yaml {
 
@@ -36,7 +38,7 @@
         public static object DefaultParseInteger(int sign, string digits, int @base) {
             int result;
             if (!TryParseInteger(sign, digits, @base, out result)) {
-                throw new ArgumentException(string.Format("Could not parse integer value: '{0}' (sign {1}, base {2})", digits, sign, @base));
+                return ParseBigInteger(sign, digits, @base);                
             }
             return result;
         }
@@ -119,6 +121,28 @@
             return true;
         }
 
+        public sealed class YamlBignumParser : UnsignedBigIntegerParser {
+            private string _digits;
+            private int _base;
+            private int _position;
+
+            public YamlBignumParser(string digits, int @base) {
+                _digits = digits;
+                _base = @base;
+                _position = 0;
+            }
+
+            protected override int ReadDigit() {
+                return CharValue(_digits[_position++], _base);
+            }
+        }
+
+        public static BigInteger ParseBigInteger(int sign, string text, int @base) {
+            YamlBignumParser p = new YamlBignumParser(text, @base);
+            BigInteger ret = p.ParseDecimal(text.Length);
+            return sign > 0 ? ret : -ret;
+        }
+
         #endregion
     }
 }
===================================================================
add: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/NodeProvider.cs
File: NodeProvider.cs
===================================================================
--- [no source file]
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/NodeProvider.cs;YamlParse2
@@ -1,0 +1,67 @@
+?/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. 
+ *
+ * This source code is subject to terms and conditions of the Microsoft Public License. A 
+ * copy of the license can be found in the License.html file at the root of this distribution. If 
+ * you cannot locate the  Microsoft Public License, please send an email to 
+ * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
+ * by the terms of the Microsoft Public License.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ *
+ * ***************************************************************************/
+
+using System;
+using Ruby.StandardLibrary.Yaml;
+using System.Collections.Generic;
+
+namespace Ruby.StandardLibrary.Yaml {
+    /// <summary>
+    /// Provides YAML nodes for Ruby object constructor.
+    /// </summary>
+    public abstract class NodeProvider : IEnumerable<Node> {
+        public abstract bool CheckNode();
+        public abstract Node GetNode();
+
+        #region IEnumerable<Node> Members
+
+        public IEnumerator<Node> GetEnumerator() {
+            while (CheckNode()) {
+                yield return GetNode();
+            }
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
+            return GetEnumerator();
+        }
+
+        #endregion
+    }
+
+    /// <summary>
+    /// Simple NodeProvider implementation. Provides only one given node.
+    /// </summary>
+    public class SimpleNodeProvider : NodeProvider {
+        private Node _node;
+
+        public SimpleNodeProvider(Node/*!*/ node) {
+            _node = node;
+        }        
+
+        public override bool CheckNode() {
+            return _node != null;
+        }
+
+        public override Node GetNode() {
+            if (CheckNode()) {
+                Node tmp = _node;
+                _node = null;
+                return tmp;
+            } else {
+                return null;
+            }            
+        }              
+    }
+}
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;C443395
File: Representer.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;C443395  (server)    6/25/2008 5:39 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;YamlParse2
@@ -57,6 +57,7 @@
                             _links.Add(dataKey, list = new List<LinkNode>());
                         }
                         list.Add(link);
+                        return link;
                     }
                     return node;
                 }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;C475196
File: SafeConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;C475196  (server)    6/24/2008 4:45 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;YamlParse2
@@ -66,8 +66,8 @@
             _yamlMultiRegexps.Add(tagPrefix, new Regex("^" + tagPrefix, RegexOptions.Compiled));
         }
 
-        public SafeConstructor(Composer composer)
-            : base(composer) {
+        public SafeConstructor(/*!*/NodeProvider nodeProvider)
+            : base(nodeProvider) {
         }
 
         private static Dictionary<string, bool> BOOL_VALUES = new Dictionary<string, bool>();
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Serializer.cs;C443395
File: Serializer.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Serializer.cs;C443395  (server)    6/24/2008 12:36 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Serializer.cs;YamlParse2
@@ -137,7 +137,7 @@
                     string defaultTag = Resolver.Resolve(typeof(ScalarNode), scalar.Value, new bool[] { false, true });
                     bool[] @implicit = new bool[] { false, false };
                     if (!_explicitTypes) {
-                        @implicit[0] = node.Tag == detectedTag;
+                        @implicit[0] = node.Tag == detectedTag || node.Tag.StartsWith(detectedTag);
                         @implicit[1] = node.Tag == defaultTag;
                     }
                     _emitter.Emit(new ScalarEvent(tAlias, node.Tag, @implicit, scalar.Value, scalar.Style));
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/YamlConfig.cs;C443395
File: YamlConfig.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/YamlConfig.cs;C443395  (server)    6/24/2008 2:55 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/YamlConfig.cs;YamlParse2
@@ -37,6 +37,8 @@
         private bool _useSingle;
         private bool _useDouble;
 
+        internal static readonly YamlOptions DefaultOptions = new YamlOptions();
+
         public int Indent { get { return _indent; } set { _indent = value; } }
         public bool UseHeader { get { return _useHeader; } set { _useHeader = value; } }
         public bool UseVersion { get { return _useVersion; } set { _useVersion = value; } }
===================================================================
delete: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/YamlDocument.cs;C443395
File: YamlDocument.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/YamlDocument.cs;C443395  (server)    6/24/2008 2:55 PM
+++ [no target file]
@@ -1,112 +1,0 @@
-?/***** BEGIN LICENSE BLOCK *****
- * Version: CPL 1.0
- *
- * The contents of this file are subject to the Common Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/cpl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2007 Ola Bini <ola@ologix.com>
- * Copyright (c) Microsoft Corporation.
- * 
- ***** END LICENSE BLOCK *****/
-
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-
-namespace Ruby.StandardLibrary.Yaml {
-    /// <summary>
-    /// A collection of convenience methods for loading/saving data from YAML documents
-    /// </summary>
-    public static class YamlDocument {
-        internal static readonly YamlOptions DefaultOptions = new YamlOptions();
-
-        #region Dump, DumpAll
-
-        public static string Dump(object data) {
-            return DumpAll(new object[] { data }, DefaultOptions);
-        }
-
-        public static string Dump(object data, YamlOptions opts) {
-            return DumpAll(new object[] { data }, opts);
-        }
-
-        public static string DumpAll(IEnumerable data) {
-            return DumpAll(data, DefaultOptions);
-        }
-
-        public static string DumpAll(IEnumerable data, YamlOptions opts) {
-            StringWriter s = new StringWriter();
-            DumpAll(s, data, opts);
-            return s.ToString();
-        }
-
-        public static void Dump(TextWriter writer, object data) {
-            DumpAll(writer, new object[] { data }, DefaultOptions);
-        }
-
-        public static void Dump(TextWriter writer, object data, YamlOptions opts) {
-            DumpAll(writer, new object[] { data }, opts);
-        }
-
-        public static void DumpAll(TextWriter writer, IEnumerable data) {
-            DumpAll(writer, data, DefaultOptions);
-        }
-
-        public static void DumpAll(TextWriter writer, IEnumerable data, YamlOptions opts) {
-            using (Serializer s = new Serializer(new Emitter(writer, opts), opts)) {
-                Representer r = new Representer(s, opts);
-                foreach (object obj in data) {
-                    r.Represent(obj);
-                }
-            }
-        }
-
-        #endregion
-
-        #region Load, LoadAll
-
-        public static object Load(string input) {
-            return Load(new StringReader(input), DefaultOptions);
-        }
-
-        public static object Load(string input, YamlOptions opts) {
-            return Load(new StringReader(input), opts);
-        }
-
-        public static IEnumerable<object> LoadAll(string input) {
-            return LoadAll(new StringReader(input), DefaultOptions);
-        }
-
-        public static IEnumerable<object> LoadAll(string input, YamlOptions opts) {
-            return LoadAll(new StringReader(input), opts);
-        }
-
-        public static object Load(TextReader input) {
-            return Load(input, DefaultOptions);
-        }
-
-        public static object Load(TextReader input, YamlOptions opts) {
-            foreach (object obj in LoadAll(input, opts)) {
-                return obj;
-            }
-            return null;
-        }
-
-        public static IEnumerable<object> LoadAll(TextReader input) {
-            return LoadAll(input, DefaultOptions);
-        }
-
-        public static IEnumerable<object> LoadAll(TextReader input, YamlOptions opts) {
-            return new Constructor(new Composer(new Parser(new Scanner(input), opts)));
-        }
-
-        #endregion
-    }
-}
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/load_stream_tests.rb;C469847
File: load_stream_tests.rb
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/load_stream_tests.rb;C469847  (server)    6/25/2008 9:54 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/load_stream_tests.rb;YamlParse2
@@ -2,12 +2,11 @@
 require 'yaml'
 #require 'mscorlib'
 
-class Module
-      def const_missing name
-        #puts "missing #{name}"
+class Module      
+      def const_missing name                
         $S
       end
-    end
+end
 
   module YAML
     $S = Stream
@@ -117,3 +116,20 @@
 end
 
 end
+
+module YAML
+    const_set :Stream, $S    
+  end
+  
+  class Module
+      def const_missing name
+        #puts "missing #{name}"
+        $S if name == 'Stream'
+      end
+    end
+    
+    class Module      
+      def const_missing name                        	
+	  puts "missing #{name}"	  
+      end
+    end
\ No newline at end of file
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/yaml_test_suite.rb;C475196
File: yaml_test_suite.rb
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/yaml_test_suite.rb;C475196  (server)    6/17/2008 3:18 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/YamlTest/tests/ruby/yaml_test_suite.rb;YamlParse2
@@ -6,4 +6,4 @@
 require 'collections_tests'
 require 'dump_tests'
 require 'tags_tests'
-#require 'test_yaml'
+require 'test_yaml'
===================================================================
