edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C479187
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C479187  (server)    6/27/2008 1:32 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;MutableStringCenter
@@ -56,9 +56,9 @@
             #endif
             // Skipped primitive: Object
             ExtendModule(typeof(System.Collections.Generic.IDictionary<System.Object, System.Object>), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Collections__Generic__IDictionary_Instance), null, new Ruby.Builtins.RubyModule[] {def18, });
-            Ruby.Builtins.RubyModule def31 = ExtendModule(typeof(System.Collections.IEnumerable), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Collections__IEnumerable_Instance), null, new Ruby.Builtins.RubyModule[] {def18, });
+            ExtendModule(typeof(System.Collections.IEnumerable), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Collections__IEnumerable_Instance), null, new Ruby.Builtins.RubyModule[] {def18, });
             ExtendModule(typeof(System.Collections.IList), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Collections__IList_Instance), null, new Ruby.Builtins.RubyModule[] {def18, });
-            ExtendModule(typeof(System.IComparable), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new Ruby.Builtins.RubyModule[] {def27, });
+            Ruby.Builtins.RubyModule def31 = ExtendModule(typeof(System.IComparable), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new Ruby.Builtins.RubyModule[] {def27, });
             ExtendClass(typeof(System.Scripting.Actions.TypeGroup), new System.Action<Ruby.Builtins.RubyModule>(LoadSystem__Scripting__Actions__TypeGroup_Instance), null, new Ruby.Builtins.RubyModule[] {def18, }, null);
             DefineGlobalClass("Array", typeof(Ruby.Builtins.RubyArray), Context.ObjectClass, new System.Action<Ruby.Builtins.RubyModule>(LoadArray_Instance), new System.Action<Ruby.Builtins.RubyModule>(LoadArray_Class), new Ruby.Builtins.RubyModule[] {def18, }, new System.Delegate[] {
                 new System.Func<Ruby.Builtins.RubyArray>(Ruby.Builtins.ArrayOps.CreateArray),
@@ -3849,7 +3849,7 @@
             });
             
             module.DefineLibraryMethod("center", 0x29, new System.Delegate[] {
-                new System.Func<Ruby.Builtins.MutableString, System.Int32, Ruby.Builtins.MutableString, Ruby.Builtins.MutableString>(Ruby.Builtins.MutableStringOps.Center),
+                new System.Func<System.Scripting.Runtime.CodeContext, Ruby.Builtins.MutableString, System.Object, System.Object, Ruby.Builtins.MutableString>(Ruby.Builtins.MutableStringOps.Center),
             });
             
             module.DefineLibraryMethod("chomp", 0x29, new System.Delegate[] {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;C478584
File: MutableStringOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;C478584  (server)    6/27/2008 1:20 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;MutableStringCenter
@@ -1100,17 +1100,34 @@
 
         #endregion
 
+        //---------------------------------------------------------- String#center
+        //  If int is greater than the length of str, returns a new String of length int with str
+        //  centered between the given padding (defaults to spaces); otherwise, returns str.
+        //-------------------------------------------------------------------------
+        //    "hello".center(4) => "hello"
+        //    "hello".center(20) => "       hello        "
+        //    "hello".center(4, "_^") => "hello"
+        //    "hello".center(20, "_^") => "_^_^_^_hello_^_^_^_^"
+        //    "hello".center(20, "-") => "-------hello--------"
+        #region center
+
         [RubyMethod("center", RubyMethodAttributes.PublicInstance)]
-        public static MutableString/*!*/ Center(MutableString/*!*/ self, int length, [Optional]MutableString padding) {
-            if (padding != null && padding.Length == 0) {
-                throw RubyExceptions.CreateArgumentError("zero width padding");
+        public static MutableString/*!*/ Center(CodeContext/*!*/ context, MutableString/*!*/ self, object len, [Optional]object pad) {
+            int length = (int) Protocols.CastToInteger(context, len);
+
+            MutableString padding = null;
+            if (pad == Missing.Value) {
+                padding = MutableString.Create(" ");
+            } else {
+                padding = Protocols.CastToString(context, pad);
+                if (padding.Length == 0) {
+                    throw RubyExceptions.CreateArgumentError("zero width padding");
+                }
             }
+
             if (self.Length >= length) {
                 return self;
             }
-            if (padding == null) {
-                padding = MutableString.Create(" ");
-            }
 
             char[] charArray = new char[length];
             int n = (length - self.Length) / 2;
@@ -1127,9 +1144,14 @@
             for (int i = 0; i < m; i++) {
                 charArray[n + self.Length + i] = padding.GetChar(i % padding.Length);
             }
-            return MutableString.Create(new string(charArray));
+
+            MutableString result = CreateSubClass(context, self, MutableString.Create(new string(charArray)));
+            // Flow taint of from padding to self, and then from self to centered string 
+            return RubyUtils.FlowTaint(context, RubyUtils.FlowTaint(context, padding, self), result);
         }
 
+        #endregion
+
         //----------------------------------------------------------- String#chomp
         //     str.chomp(separator=$/)   => new_str
         //------------------------------------------------------------------------
===================================================================
