edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C502939
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C502939  (server)    7/22/2008 11:51 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;YamlFixes
@@ -5252,7 +5252,7 @@
             
             module.DefineLibraryMethod("at", 0x31, new System.Delegate[] {
                 new System.Func<System.Object, System.DateTime, System.DateTime>(Ruby.Builtins.TimeOps.Create),
-                new System.Func<System.Object, System.Int64, System.DateTime>(Ruby.Builtins.TimeOps.Create),
+                new System.Func<System.Object, System.Double, System.DateTime>(Ruby.Builtins.TimeOps.Create),
                 new System.Func<System.Object, System.Int64, System.Int64, System.DateTime>(Ruby.Builtins.TimeOps.Create),
             });
             
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs;C468100
File: TimeOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs;C468100  (server)    7/13/2008 11:37 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs;YamlFixes
@@ -64,9 +64,10 @@
         }
 
         [RubyMethod("at", RubyMethodAttributes.PublicSingleton)]
-        public static DateTime Create(object/*!*/ self, long seconds) {
+        public static DateTime Create(object/*!*/ self, double seconds) {
             return epoch.ToLocalTime().AddSeconds(seconds);
         }
+        
 
         [RubyMethod("at", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Create(object/*!*/ self, long seconds, long microseconds) {
@@ -154,8 +155,8 @@
 
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
-        public static DateTime CreateLocalTime(object/*!*/ self, int year, int month, int day, int hour, int minute, int second, int millisecond) {
-            return new DateTime(year, month, day, hour, minute, second, millisecond);
+        public static DateTime CreateLocalTime(object/*!*/ self, int year, int month, int day, int hour, int minute, int second, int microsecond) {
+            return new DateTime(year, month, day, hour, minute, second, microsecond/1000);
         }
 
         private static int GetComponent(CodeContext/*!*/ context, object[] components, int index, int defValue) {
@@ -237,8 +238,8 @@
 
         [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
-        public static DateTime CreateGmtTime(object/*!*/ self, int year, int month, int day, int hour, int minute, int second, int millisecond) {
-            return new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc);
+        public static DateTime CreateGmtTime(object/*!*/ self, int year, int month, int day, int hour, int minute, int second, int microsecond) {
+            return new DateTime(year, month, day, hour, minute, second, microsecond/1000, DateTimeKind.Utc);
         }
 
         [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
@@ -249,7 +250,7 @@
             }
             return new DateTime(Protocols.CastToFixnum(context, components[0]), GetComponent(context, components, 1, 1),
                 GetComponent(context, components, 2, 1), GetComponent(context, components, 3, 0), GetComponent(context, components, 4, 0),
-                GetComponent(context, components, 5, 0), GetComponent(context, components, 6, 0), DateTimeKind.Utc);
+                GetComponent(context, components, 5, 0), GetComponent(context, components, 6, 0)/1000, DateTimeKind.Utc);
         }
 
         #endregion
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libs/yaml.rb;C503216
File: yaml.rb
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libs/yaml.rb;C503216  (server)    7/23/2008 12:18 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libs/yaml.rb;YamlFixes
@@ -12,5 +12,6 @@
 #
 #
 # ****************************************************************************
-
+
+require 'date'
 load_assembly 'IronRuby.Libraries.Yaml', 'Ruby.StandardLibrary.Yaml'
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml.sln;C436739
File: IronRuby.Libraries.Yaml.sln
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml.sln;C436739  (server)    7/11/2008 8:40 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml.sln;YamlFixes
@@ -3,9 +3,17 @@
 # Visual Studio 2008
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IronRuby.Libraries.Yaml", "IronRuby.Libraries.Yaml\IronRuby.Libraries.Yaml.csproj", "{AA18A245-E342-4368-A474-83178311A742}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YamlTest", "YamlTest\YamlTest.csproj", "{BD5BC8D4-89E8-4A76-8865-306280B0269B}"
-EndProject
 Global
+	GlobalSection(TeamFoundationVersionControl) = preSolution
+		SccNumberOfProjects = 1
+		SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
+		SccTeamFoundationServer = http://vstfdevdiv:8080/
+		SccProjectUniqueName0 = IronRuby.Libraries.Yaml\\IronRuby.Libraries.Yaml.csproj
+		SccProjectName0 = IronRuby.Libraries.Yaml
+		SccAuxPath0 = http://vstfdevdiv:8080
+		SccLocalPath0 = IronRuby.Libraries.Yaml
+		SccProvider0 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
+	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Release|Any CPU = Release|Any CPU
@@ -15,10 +23,6 @@
 		{AA18A245-E342-4368-A474-83178311A742}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{AA18A245-E342-4368-A474-83178311A742}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AA18A245-E342-4368-A474-83178311A742}.Release|Any CPU.Build.0 = Release|Any CPU
-		{BD5BC8D4-89E8-4A76-8865-306280B0269B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{BD5BC8D4-89E8-4A76-8865-306280B0269B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BD5BC8D4-89E8-4A76-8865-306280B0269B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{BD5BC8D4-89E8-4A76-8865-306280B0269B}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C488746
File: BuiltinsOps.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C488746  (server)    7/20/2008 12:31 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;YamlFixes
@@ -288,12 +288,26 @@
         }
     }
 
+    [RubyModule(Extends = typeof(DateTime))]
+    public static class DateTimeOps {
+        [RubyMethod("to_yaml_node")]
+        public static Node ToYaml(CodeContext/*!*/ context, DateTime self, RubyRepresenter/*!*/ rep) {
+            string format = (self.Millisecond != 0) ? "yyyy-MM-dd HH:mm:ss.fffffff K" : "yyyy-MM-dd HH:mm:ss K";
+            return rep.Scalar(context, self, MutableString.Create(self.ToString(format)));
+        }
+
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(CodeContext context, DateTime self) {
+            return MutableString.Create("tag:yaml.org,2002:timestamp");
+        }
+    }
+
     [RubyModule(Extends = typeof(SymbolId))]
     public static class YamlSymbolOps {
         [RubyMethod("to_yaml_node")]
         public static Node ToYaml(CodeContext context, object self, RubyRepresenter rep) {
             return rep.Scalar(context, self, RubySites.Inspect(context, self));
-            }
+        }
         
         [RubyMethod("taguri")]
         public static MutableString TagUri(CodeContext/*!*/ context, object self) {
@@ -331,6 +345,10 @@
         public static Node ToYaml(CodeContext context, object self, RubyRepresenter rep) {
             return rep.Scalar(context, self, null);
         }
+        [RubyMethod("taguri")]
+        public static MutableString TagUri(object self) {
+            return MutableString.Create("tag:yaml.org,2002:null");
+        }
     }
 
     [RubyClass(Extends = typeof(Node))]
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C502939
File: Initializer.Generated.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C502939  (server)    7/22/2008 11:56 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;YamlFixes
@@ -32,6 +32,7 @@
             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.DateTime), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__DateTime_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);
@@ -188,6 +189,18 @@
             
         }
         
+        private void LoadSystem__DateTime_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
+            
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Func<System.Scripting.Runtime.CodeContext, System.DateTime, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.DateTimeOps.TagUri),
+            });
+            
+            module.DefineLibraryMethod("to_yaml_node", 0x9, new System.Delegate[] {
+                new System.Func<System.Scripting.Runtime.CodeContext, System.DateTime, Ruby.StandardLibrary.Yaml.RubyRepresenter, Ruby.StandardLibrary.Yaml.Node>(Ruby.StandardLibrary.Yaml.DateTimeOps.ToYaml),
+            });
+            
+        }
+        
         private void LoadSystem__Double_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
             
             module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
@@ -238,6 +251,10 @@
         
         private void LoadSystem__Scripting__None_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
             
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Func<System.Object, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlNilOps.TagUri),
+            });
+            
             module.DefineLibraryMethod("to_yaml_node", 0x9, new System.Delegate[] {
                 new System.Func<System.Scripting.Runtime.CodeContext, System.Object, Ruby.StandardLibrary.Yaml.RubyRepresenter, Ruby.StandardLibrary.Yaml.Node>(Ruby.StandardLibrary.Yaml.YamlNilOps.ToYaml),
             });
@@ -258,6 +275,10 @@
         
         private void LoadYAML_Class(Ruby.Builtins.RubyModule/*!*/ module) {
             
+            module.DefineLibraryMethod("add_domain_type", 0x12, new System.Delegate[] {
+                new System.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, Ruby.Runtime.BlockParam, Ruby.Builtins.MutableString, System.Object, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.AddDomainType),
+            });
+            
             module.DefineLibraryMethod("dump", 0x12, new System.Delegate[] {
                 new System.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyModule, System.Object, Ruby.Builtins.RubyIO, System.Object>(Ruby.StandardLibrary.Yaml.RubyYaml.Dump),
             });
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C488746
File: RubyConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C488746  (server)    7/9/2008 5:01 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;YamlFixes
@@ -27,6 +27,8 @@
 using Microsoft.Scripting.Actions;
 using Ruby.Builtins;
 using Ruby.Runtime;
+using System.Diagnostics;
+using System.Linq.Expressions;
 
 namespace Ruby.StandardLibrary.Yaml {
 
@@ -34,7 +36,12 @@
         private readonly static Dictionary<string, YamlConstructor> _yamlConstructors = new Dictionary<string, YamlConstructor>();
         private readonly static Dictionary<string, YamlMultiConstructor> _yamlMultiConstructors = new Dictionary<string, YamlMultiConstructor>();
         private readonly static Dictionary<string, Regex> _yamlMultiRegexps = new Dictionary<string, Regex>();                
-        private readonly static Regex _regexPattern = new Regex("^/(?<expr>.+)/(?<opts>[eimnosux]*)$", RegexOptions.Compiled);        
+        private readonly static Regex _regexPattern = new Regex("^/(?<expr>.+)/(?<opts>[eimnosux]*)$", RegexOptions.Compiled);
+        private static readonly DynamicSite<BlockParam, object, object, object> _Block = 
+            CallSiteFactory.CreateSimpleCallSite<BlockParam, object, object, object>(RubyContext.RubyBinder);
+        private static readonly DynamicSite<RubyModule, object, object, object, object> _New = 
+            DynamicSite<RubyModule, object, object, object, object>.Create(
+            LibrarySites.InstanceCallAction("new", ArgumentKind.Simple, ArgumentKind.Simple, ArgumentKind.Simple));
 
         public override YamlConstructor GetYamlConstructor(string key) {
             YamlConstructor result;
@@ -77,6 +84,35 @@
             }
         }
 
+        private class ExternalConstructor {
+            private BlockParam _block;
+
+            public ExternalConstructor(BlockParam block) {
+                _block = block;
+            }
+
+            public object Construct(IConstructor ctor, string tag, Node node) {                
+                return _Block.Invoke(ctor.GetContext(), _block, MutableString.Create(tag), ctor.ConstructPrimitive(node));
+            }
+
+            public object Construct(IConstructor ctor, Node node) {
+                return Construct(ctor, node.Tag, node);
+            }
+        }
+
+        public static void AddExternalConstructor(string tag, BlockParam block) {
+            if (!_yamlConstructors.ContainsKey(tag)) {
+                _yamlConstructors.Add(tag, new ExternalConstructor(block).Construct);
+            }
+        }
+
+        public static void AddExternalMultiConstructor(string regex, BlockParam block) {
+            if (!_yamlMultiConstructors.ContainsKey(regex)) {
+                _yamlMultiConstructors.Add(regex, new ExternalConstructor(block).Construct);
+                _yamlMultiRegexps.Add(regex, new Regex(regex, RegexOptions.Compiled));
+            }
+        }
+
         public static object ConstructRubyOmap(IConstructor ctor, Node node) {
             return ctor.ConstructPairs(node);
         }
@@ -219,6 +255,33 @@
             return newStruct;
         }
 
+        public static MutableString ConstructRubyBinary(IConstructor ctor, Node node) {
+            return MutableString.CreateBinary(SafeConstructor.ConstructYamlBinary(ctor, node));
+        }
+
+        public static object ConstructRubyTimestampYMD(IConstructor ctor, Node node) {
+            ScalarNode scalar = node as ScalarNode;
+            if (scalar == null) {
+                throw new ConstructorException("Can only contruct timestamp from scalar node.");
+            }
+
+            Match match = SafeConstructor.YMD_REGEXP.Match(scalar.Value);
+            if (match.Success) {
+                int year_ymd = int.Parse(match.Groups[1].Value);
+                int month_ymd = int.Parse(match.Groups[2].Value);
+                int day_ymd = int.Parse(match.Groups[3].Value);
+
+                RubyModule module;
+                CodeContext context = ctor.GetContext();
+                if (RubyUtils.GetExecutionContext(context).TryGetModule(SymbolTable.StringToId("Date"), out module)) {
+                    return _New.Invoke(context, module, year_ymd, month_ymd, day_ymd);
+                } else {
+                    throw new ConstructorException("Date class not found.");
+                }
+            }
+            throw new ConstructorException("Invalid tag:yaml.org,2002:timestamp#ymd value.");
+        }
+
         public RubyConstructor(CodeContext/*!*/ context, NodeProvider/*!*/ nodeProvider)
             : base(nodeProvider, context) {            
             AddConstructor("tag:yaml.org,2002:str", ConstructRubyScalar);
@@ -226,6 +289,8 @@
             AddConstructor("tag:ruby.yaml.org,2002:regexp", ConstructRubyRegexp);
             AddMultiConstructor("tag:ruby.yaml.org,2002:object:", ConstructPrivateObject);            
             AddMultiConstructor("tag:ruby.yaml.org,2002:struct:", ConstructRubyStruct);
+            AddConstructor("tag:yaml.org,2002:binary", ConstructRubyBinary);
+            AddConstructor("tag:yaml.org,2002:timestamp#ymd", ConstructRubyTimestampYMD);
 
             //AddConstructor("tag:yaml.org,2002:omap", ConstructRubyOmap);
             //AddMultiConstructor("tag:yaml.org,2002:seq:", ConstructSpecializedRubySequence);
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;C490874
File: RubyYaml.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;C490874  (server)    7/9/2008 4:55 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;YamlFixes
@@ -147,14 +147,12 @@
             if (block == null && rc.CheckData()) {
                 throw RubyExceptions.NoBlockGiven();
             }
-
             foreach (object obj in rc) {
                 object result;
                 if (block.Yield(obj, out result)) {
                     return result;
                 }
             }
-
             return null;
         }
 
@@ -191,7 +189,6 @@
             if (block == null && c.CheckNode()) {
                 throw RubyExceptions.NoBlockGiven();
             }
-
             foreach (object obj in c) {
                 object result;
                 if (block.Yield(obj, out result)) {
@@ -239,6 +236,25 @@
             return arg;
         }
 
+        [RubyMethod("add_domain_type", RubyMethodAttributes.PrivateSingleton)]
+        public static object AddDomainType(CodeContext/*!*/ context, RubyModule self, BlockParam/*!*/ block, 
+            MutableString/*!*/ domainAndDate, object/*!*/ typeRegex) {
+            if (block == null) {
+                throw RubyExceptions.NoBlockGiven();
+            }
+            RubyRegex r = typeRegex as RubyRegex;
+            if (r != null) {
+                MutableString tag = MutableString.Create("tag:").Append(domainAndDate).Append(":").Append(r.GetPattern());
+                RubyConstructor.AddExternalMultiConstructor(tag.ConvertToString(), block);
+            }
+            MutableString typeStr = Protocols.ConvertToString(context, typeRegex);
+            if (typeStr != null) {
+                MutableString tag = MutableString.Create("tag:").Append(domainAndDate).Append(":").Append(typeStr);
+                RubyConstructor.AddExternalConstructor(tag.ConvertToString(), block);
+            }
+            return null;
+        }
+
         private static RubyConstructor/*!*/ MakeConstructor(CodeContext/*!*/ context, TextReader/*!*/ reader) {
             return new RubyConstructor(context, MakeComposer(reader));
         }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;C488746
File: BaseConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;C488746  (server)    7/20/2008 11:39 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/BaseConstructor.cs;YamlFixes
@@ -250,6 +250,7 @@
             return val;
         }
 
+        //TODO: remove Ruby-dpecific stuff from this layer
         public Hash ConstructMapping(Node mappingNode) {
             MappingNode map = mappingNode as MappingNode;
             if (map == null) {
@@ -290,10 +291,10 @@
                     LinkNode linkNode = vv as LinkNode;
                     if (linkNode != null) {
                         AddFixer(linkNode.Linked, delegate (Node node, object real) {
-                            mapping[kk ?? NullObjectKey] = real;
+                            IDictionaryOps.SetElement(_context, mapping, kk, real);
                         });
                     }
-                    mapping[kk ?? NullObjectKey] = vv;
+                    IDictionaryOps.SetElement(_context, mapping, kk, vv);
                 }
             }
             if (null != merge) {
@@ -301,7 +302,7 @@
                 mapping = new Hash(_context);
                 foreach (Hash m in merge) {                    
                     foreach (KeyValuePair<object, object> e in m) {
-                        mapping[e.Key ?? NullObjectKey] = e.Value;
+                        IDictionaryOps.SetElement(_context, mapping, e.Key, e.Value);
                     }
                 }
             }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Parser.cs;C443395
File: Parser.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Parser.cs;C443395  (server)    7/9/2008 6:33 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Parser.cs;YamlFixes
@@ -82,6 +82,7 @@
         private Version _yamlVersion;
         private bool _done;
         private YamlEvent _currentEvent;
+        private string _familyTypePrefix;
 
         public Parser(Scanner scanner, YamlOptions opts)
             : this(scanner, opts.Version) {
@@ -537,7 +538,7 @@
             return null;
         }
 
-        private static Regex ONLY_WORD = new Regex("^\\w+$", RegexOptions.Compiled);
+        private static Regex ONLY_WORD = new Regex("^\\w+$", RegexOptions.Compiled);       
 
         private string GetTag(TagToken tagToken) {
             if (tagToken == null) { // check against "!"?
@@ -548,7 +549,10 @@
             string suffix = tagToken.Suffix;
             int ix = -1;
             if ((ix = suffix.IndexOf("^")) != -1) {
-                suffix = suffix.Substring(0, ix) + suffix.Substring(ix + 1);
+                if (ix > 0) {
+                    _familyTypePrefix = suffix.Substring(0, ix);
+                }                
+                suffix = _familyTypePrefix + suffix.Substring(ix + 1);
             }
             if (handle != null) {
                 if (!_tagHandles.ContainsKey(handle)) {
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;C479346
File: Representer.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;C479346  (server)    7/20/2008 1:01 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/Representer.cs;YamlFixes
@@ -20,6 +20,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Reflection;
+using System.Scripting.Runtime;
 
 namespace Ruby.StandardLibrary.Yaml {
 
@@ -98,6 +99,8 @@
                 object key = e.Key;
                 if (key == BaseConstructor.NullObjectKey) {
                     key = null;
+                } else {
+                    key = BaseSymbolDictionary.ObjToNull(key);
                 }
                 value.Add(RepresentData(key), RepresentData(e.Value));
             }
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;C480838
File: SafeConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;C480838  (server)    7/9/2008 7:09 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Engine/SafeConstructor.cs;YamlFixes
@@ -123,9 +123,9 @@
         }
 
         private static Regex TIMESTAMP_REGEXP = new Regex("^(-?[0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \t]*(Z|([-+][0-9][0-9]?)(?::([0-9][0-9])?)?)))?$");
-        private static Regex YMD_REGEXP = new Regex("^(-?[0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)$");
+        internal static Regex YMD_REGEXP = new Regex("^(-?[0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)$");
 
-        public static object ConstructYamlTimestamp(IConstructor ctor, Node node) {
+        public static object ConstructYamlTimestampYMD(IConstructor ctor, Node node) {
             ScalarNode scalar = node as ScalarNode;
             if (scalar == null) {
                 throw new ConstructorException("can only contruct timestamp from scalar node");
@@ -139,8 +139,17 @@
 
                 return new DateTime(year_ymd, month_ymd, day_ymd);
             }
-            match = TIMESTAMP_REGEXP.Match(scalar.Value);
+            throw new ConstructorException("Invalid tag:yaml.org,2002:timestamp#ymd value.");
+        }
 
+        public static object ConstructYamlTimestamp(IConstructor ctor, Node node) {
+            ScalarNode scalar = node as ScalarNode;
+            if (scalar == null) {
+                throw new ConstructorException("can only contruct timestamp from scalar node");
+            }
+            
+            Match match = TIMESTAMP_REGEXP.Match(scalar.Value);
+
             if (!match.Success) {
                 return ctor.ConstructPrivateType(node);
             }
@@ -156,15 +165,7 @@
             string timezoneh_s = match.Groups[9].Value;
             string timezonem_s = match.Groups[10].Value;
 
-            int usec = 0;
-            if (fract_s != "") {
-                usec = int.Parse(fract_s);
-                if (usec != 0) {
-                    while (10 * usec < 1000) {
-                        usec *= 10;
-                    }
-                }
-            }
+            bool isUtc = utc == "Z" || utc == "z";
 
             DateTime dt = new DateTime(
                 year_s != "" ? int.Parse(year_s) : 0,
@@ -173,11 +174,20 @@
                 hour_s != "" ? int.Parse(hour_s) : 0,
                 min_s != "" ? int.Parse(min_s) : 0,
                 sec_s != "" ? int.Parse(sec_s) : 0,
-                usec / 1000,
-                DateTimeKind.Utc
+                isUtc? DateTimeKind.Utc : DateTimeKind.Local
             );
 
-            if ("Z" != utc && "z" != utc) {
+            if (!string.IsNullOrEmpty(fract_s)) {
+                long fract = int.Parse(fract_s);
+                if (fract > 0) {
+                    while (fract < 1000000) {
+                        fract *= 10;
+                    }
+                    dt = dt.AddTicks(fract);
+                }
+            }
+
+            if (!isUtc) {
                 if (timezoneh_s != "" || timezonem_s != "") {
                     int zone = 0;
                     int sign = +1;
@@ -190,8 +200,8 @@
                     if (timezonem_s != "") {
                         zone += int.Parse(timezonem_s) * 60000;
                     }
-
-                    dt = dt.AddMilliseconds(sign * zone);
+                    double utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(dt).TotalMilliseconds;
+                    dt = dt.AddMilliseconds(utcOffset - sign * zone);
                 }
             }
             return dt;
@@ -348,7 +358,7 @@
             AddConstructor("tag:yaml.org,2002:int", ConstructYamlInt);
             AddConstructor("tag:yaml.org,2002:float", ConstructYamlFloat);
             AddConstructor("tag:yaml.org,2002:timestamp", ConstructYamlTimestamp);
-            AddConstructor("tag:yaml.org,2002:timestamp#ymd", ConstructYamlTimestamp);
+            AddConstructor("tag:yaml.org,2002:timestamp#ymd", ConstructYamlTimestampYMD);
             AddConstructor("tag:yaml.org,2002:str", ConstructYamlStr);
             AddConstructor("tag:yaml.org,2002:binary", ConstructYamlBinary);
             AddConstructor("tag:yaml.org,2002:seq", ConstructYamlSeq);
===================================================================
