edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;C478584
File: RubyUtils.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;C478584  (server)    7/1/2008 4:46 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;YamlRegex
@@ -514,9 +514,17 @@
             }
         }
 
-        private static int _stringEvalCounter;
+        private static int _stringEvalCounter;        
 
         public static object Evaluate(MutableString/*!*/ code, RubyScope/*!*/ targetScope, object self, RubyModule module, MutableString file, int line) {
+            return Evaluate(code.ConvertToString(), targetScope, self, module, file, line);
+        }
+
+        public static object Evaluate(string/*!*/ code, RubyScope/*!*/ targetScope) {
+            return Evaluate(code, targetScope, null, null, null, 0);
+        }
+
+        public static object Evaluate(string/*!*/ code, RubyScope/*!*/ targetScope, object self, RubyModule module, MutableString file, int line) {
             Assert.NotNull(code, targetScope);
 
             RubyExecutionContext ec = targetScope.ExecutionContext;
@@ -531,7 +539,7 @@
             options.LocalNames = targetScope.GetVisibleLocalNames();
             options.TopLevelMethodName = (methodScope != null) ? methodScope.Method.DefinitionName : SymbolId.Empty;
 
-            SourceUnit source = ec.Context.CreateSnippet(code.ConvertToString());
+            SourceUnit source = ec.Context.CreateSnippet(code);
             LambdaExpression lambda;
             try {
                 lambda = ec.Context.ParseSourceCode(source, options, ec.RuntimeErrorSink);
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C480838
File: BuiltinsOps.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;C480838  (server)    7/1/2008 4:21 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/BuiltinsOps.cs;YamlRegex
@@ -278,6 +278,10 @@
         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, [NotNull]RubyRegex self) {
+            return MutableString.Create("tag:ruby.yaml.org,2002:regexp");
+        }
     }
 
     [RubyModule(Extends = typeof(SymbolId))]
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C480838
File: Initializer.Generated.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;C480838  (server)    7/1/2008 4:22 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/Initializer.Generated.cs;YamlRegex
@@ -131,6 +131,10 @@
         
         private void LoadRuby__Builtins__RubyRegex_Instance(Ruby.Builtins.RubyModule/*!*/ module) {
             
+            module.DefineLibraryMethod("taguri", 0x9, new System.Delegate[] {
+                new System.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.RubyRegex, Ruby.Builtins.MutableString>(Ruby.StandardLibrary.Yaml.YamlRegexpOps.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.YamlRegexpOps.ToYaml),
             });
===================================================================
edit: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C480838
File: RubyConstructor.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;C480838  (server)    7/1/2008 10:33 AM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyConstructor.cs;YamlRegex
@@ -24,6 +24,7 @@
 using Ruby.Builtins;
 using Ruby.Runtime;
 using System.Scripting.Runtime;
+using System.IO;
 
 namespace Ruby.StandardLibrary.Yaml {
 
@@ -88,38 +89,76 @@
             return value;
         }
 
+        private object ParseObject(string value) {
+            Composer composer = RubyYaml.MakeComposer(new StringReader(value));
+            if (composer.CheckNode()) {
+                return ConstructObject(composer.GetNode());
+            } else {
+                throw new ConstructorException("Invalid Range element: " + value);
+            }
+        }
+
         public Range ConstructRubyRange(IConstructor ctor, Node node) {
-            MappingNode mapping = node as MappingNode;
-            if (mapping == null) {
-                throw new ConstructorException("can only contruct Range from mapping node");
-            }
             object begin = null;
             object end = null;
             bool excludeEnd = false;
-            foreach (KeyValuePair<Node, Node> n in mapping.Nodes) {
-                string key = ConstructScalar(n.Key).ToString();
-                switch (key) {
-                    case "begin":
-                        begin = ConstructObject(n.Value);    
-                        break;
-                    case "end":
-                        end = ConstructObject(n.Value);    
-                        break;
-                    case "excl":
-                        TryConstructYamlBool(ctor, n.Value, out excludeEnd);                        
-                        break;
-                    default:
-                        throw new ConstructorException(string.Format("'{0}' is not allowed as an instance variable name for class Range", key));
+            ScalarNode scalar = node as ScalarNode;                        
+            if (scalar != null) {
+                string value = scalar.Value;                
+                int dotsIdx;
+                if ((dotsIdx = value.IndexOf("...")) != -1) {
+                    begin = ParseObject(value.Substring(0, dotsIdx));                
+                    end = ParseObject(value.Substring(dotsIdx + 3));
+                    excludeEnd = true;
+                } else if ((dotsIdx = value.IndexOf("..")) != -1) {
+                    begin = ParseObject(value.Substring(0, dotsIdx));
+                    end = ParseObject(value.Substring(dotsIdx + 2));
+                } else {
+                    throw new ConstructorException("Invalid Range: " + value);
+                }
+            } else {
+                MappingNode mapping = node as MappingNode;
+                if (mapping == null) {
+                    throw new ConstructorException("Invalid Range: " + node);    
+                }
+                foreach (KeyValuePair<Node, Node> n in mapping.Nodes) {
+                    string key = ConstructScalar(n.Key).ToString();
+                    switch (key) {
+                        case "begin":
+                            begin = ConstructObject(n.Value);
+                            break;
+                        case "end":
+                            end = ConstructObject(n.Value);
+                            break;
+                        case "excl":
+                            TryConstructYamlBool(ctor, n.Value, out excludeEnd);
+                            break;
+                        default:
+                            throw new ConstructorException(string.Format("'{0}' is not allowed as an instance variable name for class Range", key));
+                    }
                 }                
             }
             return new Range(Context, begin, end, excludeEnd);            
         }
 
+        public RubyRegex ConstructRubyRegexp(IConstructor ctor, Node node) {
+            ScalarNode scalar = node as ScalarNode;
+            if (node == null) {
+                throw RubyExceptions.CreateTypeError("Can only create regex from scalar node");
+            }
+            RubyRegex result = RubyUtils.Evaluate(scalar.Value, (RubyScope)Context) as RubyRegex;
+            if (result == null) {
+                throw new ConstructorException("Invalid Regular expression: \"" + scalar.Value + "\"");
+            }
+            return result;
+        }
+
         public RubyConstructor(CodeContext/*!*/ context, NodeProvider/*!*/ nodeProvider)
             : base(nodeProvider, context) {
             _context = context;
             AddConstructor("tag:yaml.org,2002:str", ConstructRubyScalar);
             AddConstructor("tag:ruby.yaml.org,2002:range", ConstructRubyRange);
+            AddConstructor("tag:ruby.yaml.org,2002:regexp", ConstructRubyRegexp);
 
             //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;C479346
File: RubyYaml.cs
===================================================================
--- $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;C479346  (server)    7/1/2008 3:11 PM
+++ Shelved Change: $/Merlin_External/Languages/IronRuby/yaml/IronRuby.Libraries.Yaml/RubyYaml.cs;YamlRegex
@@ -235,7 +235,7 @@
             return new RubyConstructor(context, MakeComposer(reader));
         }
 
-        private static Composer/*!*/ MakeComposer(TextReader/*!*/ reader) {
+        internal static Composer/*!*/ MakeComposer(TextReader/*!*/ reader) {
             return new Composer(new Parser(new Scanner(reader), YamlOptions.DefaultOptions.Version));
         }
 
===================================================================
