[Ironruby-core] Core Review: Time and IO#open fixes

Daniele Alessandri suppakilla at gmail.com
Sun Aug 23 09:15:59 EDT 2009


Hi,
here are some fixes for bugs I encountered while testing Ruote
(http://github.com/jmettraux/ruote/) with IronRuby. As a side note,
Ruote and its test suite depend on about 13 external libraries, and
the fact that the number of failing tests is pretty much similar as if
the suite was executed under MRI 1.8.6 on Windows is impressive to me.
There is still a bunch of issues though, I will write a report later
this week.

* http://github.com/nrk/ironruby/commit/48a4a02b5b47d61f2f7a3f3887ea4bf02d63edb4

Miscellaneous fixes to Time:
 o The local time in Time.at must be computed on the result of the
addition of seconds to the UTC value of epoch
 o Wrong bitmask in TimeOps.Load(RubyContext,object,MutableString)
used to extract minutes and seconds from the binary data representing
a ruby-marshalled instance of DateTime.
 o Time.local/Time.utc:
    . Added support for string and float arguments
    . The month argument is parsed as a number or a three-letter
English name when it is string.
    . Added overloads to accepts 10 int/float arguments (C-style
gmtime values, Time#to_a)

* http://github.com/nrk/ironruby/commit/87d97c2cea0d917d72c5cd513b793bea3a502d3f

Fixed a NullReferenceException in RubyIOOps.Open() raised when IO#open
receives nil as the block parameter.

    irb(main):001:0> File.open("test.txt", &(nil))
    => #<File:test.txt>
    irb(main):002:0> File.open("test.txt", &(Proc.new { |f| puts f.path }))
    test.txt
    => nil

See the attached diff.

-- 
Daniele Alessandri
http://www.clorophilla.net/blog/
http://twitter.com/JoL1hAHN
-------------- next part --------------
diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/local_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/local_tags.txt
index 3ad8a21..22df910 100644
--- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/local_tags.txt
+++ b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/local_tags.txt
@@ -1,8 +1,4 @@
 fails:Time.local creates a time based on given values, interpreted in the local time zone
 fails:Time.local creates a time based on given C-style gmtime arguments, interpreted in the local time zone
-fails:Time.local handles string-like second argument
-fails:Time.local handles string arguments
-fails:Time.local handles float arguments
 fails:Time.local should accept various year ranges
 fails:Time.local throws ArgumentError for out of range values
-fails:Time.local throws ArgumentError for invalid number of arguments
diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/utc_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/utc_tags.txt
index e8e7bdd..c6fa1a0 100644
--- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/utc_tags.txt
+++ b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/time/utc_tags.txt
@@ -1,9 +1,5 @@
 fails:Time.utc creates a time based on given values, interpreted as UTC (GMT)
 fails:Time.utc creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)
-fails:Time.utc handles string-like second argument
-fails:Time.utc handles string arguments
-fails:Time.utc handles float arguments
 fails:Time.utc should accept various year ranges
 fails:Time.utc throws ArgumentError for out of range values
-fails:Time.utc throws ArgumentError for invalid number of arguments
 fails:Time#utc returns the utc representation of time
diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs
index c10de39..0fcaae4 100644
--- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs
+++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs
@@ -132,32 +132,31 @@ namespace IronRuby.Builtins {
                 block.Yield(io, out result);
                 io.Close();
                 return result;
             }
         }
 
         #region open
 
         [RubyMethod("open", RubyMethodAttributes.PublicSingleton)]
         public static RuleGenerator/*!*/ Open() {
             return new RuleGenerator((metaBuilder, args, name) => {
                 var targetClass = (RubyClass)args.Target;
                 targetClass.BuildObjectConstructionNoFlow(metaBuilder, args, name);
 
                 // TODO: initialize yields the block?
-                // TODO: null block check
-                if (args.Signature.HasBlock) {
+                if (args.Signature.HasBlock && args.GetBlock() != null) {
                     // ignore flow builder set up so far, we need one that creates a BlockParam for library calls:
                     metaBuilder.ControlFlowBuilder = null;
 
                     if (metaBuilder.BfcVariable == null) {
                         metaBuilder.BfcVariable = metaBuilder.GetTemporary(typeof(BlockParam), "#bfc");
                     }
 
                     metaBuilder.Result = Ast.Call(new Func<UnaryOpStorage, BlockParam, object, object>(InvokeOpenBlock).Method, 
                         Ast.Constant(new UnaryOpStorage(args.RubyContext)),
                         metaBuilder.BfcVariable, 
                         metaBuilder.Result
                     );
 
                     RubyMethodGroupInfo.RuleControlFlowBuilder(metaBuilder, args);
                 } else {
diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs
index 18e1d84..9075317 100644
--- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs
+++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/TimeOps.cs
@@ -44,52 +44,129 @@ namespace IronRuby.Builtins {
         private static long microsecondsToTicks(long microseconds) {
             return microseconds * 10;
         }
 
         private static long secondsToTicks(long seconds) {
             return seconds * 10000000;
         }
 
         [RubyMethod("at", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Create(object/*!*/ self, DateTime other) {
             return new DateTime(other.Ticks, other.Kind);
         }
 
         [RubyMethod("at", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Create(object/*!*/ self, double seconds) {
-            return epoch.ToLocalTime().AddSeconds(seconds);
+            return epoch.AddSeconds(seconds).ToLocalTime();
         }
         
 
         [RubyMethod("at", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Create(object/*!*/ self, long seconds, long microseconds) {
-            long ticks = epoch.ToLocalTime().Ticks + secondsToTicks(seconds) + microsecondsToTicks(microseconds);
-            return new DateTime(ticks);
+            long ticks = epoch.Ticks + secondsToTicks(seconds) + microsecondsToTicks(microseconds);
+            return new DateTime(ticks).ToLocalTime();
         }
 
         #endregion
 
         [RubyMethod("now", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateTime(object/*!*/ self) {
             return DateTime.Now;
         }
 
         [RubyMethod("today", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Today(object self) {
             return DateTime.Today;
         }
 
+
+        #region helpers for local, mktime, utc, gmt
+
+        private static int GetComponent(ConversionStorage<IntegerValue>/*!*/ conversionStorage, ConversionStorage<MutableString>/*!*/ stringCast,
+            object[]/*!*/ components, int index, int defValue, bool isMonth) {
+
+            if (index >= components.Length || components[index] == null) {
+                return defValue;
+            }
+
+            if (components[index] is int) {
+                return (int)components[index];
+            }
+
+            if (components[index] is double) {
+                return (int)(double)components[index];
+            }
+
+            if (!isMonth) {
+                IntegerValue componentValue = components[index] is MutableString
+                    ? Protocols.ConvertToInteger(conversionStorage, components[index])
+                    : Protocols.CastToInteger(conversionStorage, components[index]);
+
+                return componentValue.Fixnum;
+            }
+            else {
+                // month is treated in a different way
+
+                DateTime parsed;
+                MutableString month = components[index] is MutableString
+                    ? components[index] as MutableString
+                    : Protocols.CastToString(stringCast, components[index]);
+
+                if (DateTime.TryParseExact(month.ToString(), "%M", CultureInfo.InvariantCulture, DateTimeStyles.None, out parsed)) {
+                    return parsed.Month;
+                }
+                if (DateTime.TryParseExact(month.ToString(), "MMM", CultureInfo.InvariantCulture, DateTimeStyles.None, out parsed)) {
+                    return parsed.Month;
+                }
+
+                throw RubyExceptions.CreateArgumentError("argument out of range");
+            }
+        }
+
+        private static DateTime CreateTime(ConversionStorage<IntegerValue>/*!*/ conversionStorage, ConversionStorage<MutableString>/*!*/ stringCast,
+            object/*!*/ self, DateTimeKind kind, object[]/*!*/ components) {
+
+            if (components.Length == 10) {
+                return new DateTime(
+                    GetComponent(conversionStorage, stringCast, components, 5, 0, false),
+                    GetComponent(conversionStorage, stringCast, components, 4, 0, true),
+                    GetComponent(conversionStorage, stringCast, components, 3, 0, false),
+                    GetComponent(conversionStorage, stringCast, components, 2, 1, false),
+                    GetComponent(conversionStorage, stringCast, components, 1, 1, false),
+                    GetComponent(conversionStorage, stringCast, components, 0, 0, false),
+                    kind
+                );
+            }
+            else {
+                if (components.Length > 7 || components.Length == 0) {
+                    throw RubyExceptions.CreateArgumentError(String.Format("wrong number of arguments ({0} for 7)", components.Length));
+                }
+
+                return new DateTime(
+                    GetComponent(conversionStorage, stringCast, components, 0, 0, false),
+                    GetComponent(conversionStorage, stringCast, components, 1, 1, true),
+                    GetComponent(conversionStorage, stringCast, components, 2, 1, false),
+                    GetComponent(conversionStorage, stringCast, components, 3, 0, false),
+                    GetComponent(conversionStorage, stringCast, components, 4, 0, false),
+                    GetComponent(conversionStorage, stringCast, components, 5, 0, false), kind).AddTicks(
+                        GetComponent(conversionStorage, stringCast, components, 6, 0, false) * 10
+                    );
+            }
+        }
+
+        #endregion
+
         #region local, mktime
 
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateLocalTime(object/*!*/ self, int year) {
             return new DateTime(year, 1, 1);
         }
 
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateLocalTime(object/*!*/ self, int year, int month) {
             return new DateTime(year, month, 1);
         }
 
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
@@ -107,56 +184,57 @@ namespace IronRuby.Builtins {
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateLocalTime(object/*!*/ self, int year, int month, int day, int hour, int minute) {
             return new DateTime(year, month, day, hour, minute, 0);
         }
 
         [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) {
             return new DateTime(year, month, day, hour, minute, second);
         }
 
         [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 microsecond) {
-            return new DateTime(year, month, day, hour, minute, second).AddTicks(microsecond*10);
+            return new DateTime(year, month, day, hour, minute, second).AddTicks(microsecond * 10);
         }
 
-        private static int GetComponent(ConversionStorage<int>/*!*/ conversionStorage, object[] components, int index, int defValue) {
-            if (index >= components.Length || components[index] == null) {
-                return defValue;
-            }
-            return Protocols.CastToFixnum(conversionStorage, components[index]);
+        [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
+        [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
+        public static DateTime CreateLocalTime(object/*!*/ self, int second, int minute, int hour, int day, int month, int year,
+            object wday, object yday, object isdst, object zone) {
+
+            // wday, yday, isdst and zone are ignored
+            return new DateTime(year, month, day, hour, minute, second);
         }
 
         [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
-        public static DateTime CreateLocalTime(ConversionStorage<int>/*!*/ conversionStorage, object/*!*/ self, [NotNull]params object[]/*!*/ components) {
+        public static DateTime CreateLocalTime(object/*!*/ self, double second, double minute, double hour, double day, double month, double year,
+            object wday, object yday, object isdst, object zone) {
 
-            if (components.Length > 7 || components.Length == 0) {
-                throw RubyExceptions.CreateArgumentError(String.Format("wrong number of arguments ({0} for 7)", components.Length));
-            }
-            
-            return new DateTime(Protocols.CastToFixnum(conversionStorage, components[0]),
-                GetComponent(conversionStorage, components, 1, 1),
-                GetComponent(conversionStorage, components, 2, 1),
-                GetComponent(conversionStorage, components, 3, 0),
-                GetComponent(conversionStorage, components, 4, 0),
-                GetComponent(conversionStorage, components, 5, 0),
-                GetComponent(conversionStorage, components, 6, 0)
-            );
+            // wday, yday, isdst and zone are ignored
+            return new DateTime((int)year, (int)month, (int)day, (int)hour, (int)minute, (int)second);
+        }
+
+        [RubyMethod("local", RubyMethodAttributes.PublicSingleton)]
+        [RubyMethod("mktime", RubyMethodAttributes.PublicSingleton)]
+        public static DateTime CreateLocalTime(ConversionStorage<IntegerValue>/*!*/ conversionStorage, ConversionStorage<MutableString>/*!*/ stringCast,
+            object/*!*/ self, [NotNull]params object[]/*!*/ components) {
+
+            return CreateTime(conversionStorage, stringCast, self, DateTimeKind.Local, components);
         }
 
         #endregion
 
         #region utc, gm
 
         [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateGmtTime(object/*!*/ self, int year) {
             return new DateTime(year, 1, 1, 0, 0, 0, DateTimeKind.Utc);
         }
 
         [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
         public static DateTime CreateGmtTime(object/*!*/ self, int year, int month) {
@@ -183,45 +261,52 @@ namespace IronRuby.Builtins {
 
         [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) {
             return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
         }
 
         [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 microsecond) {
             return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc).AddTicks(microsecond * 10);
         }
 
         [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
-        public static DateTime CreateGmtTime(ConversionStorage<int>/*!*/ conversionStorage, RubyContext/*!*/ context, object/*!*/ self, 
-            [NotNull]params object[]/*!*/ components) {
+        public static DateTime CreateGmtTime(object/*!*/ self, int second, int minute, int hour, int day, int month, int year,
+            object wday, object yday, object isdst, object zone) {
 
-            if (components.Length > 7 || components.Length == 0) {
-                throw RubyExceptions.CreateArgumentError(String.Format("wrong number of arguments ({0} for 7)", components.Length));
-            }
-            return new DateTime(
-                Protocols.CastToFixnum(conversionStorage, components[0]),
-                GetComponent(conversionStorage, components, 1, 1),
-                GetComponent(conversionStorage, components, 2, 1),
-                GetComponent(conversionStorage, components, 3, 0),
-                GetComponent(conversionStorage, components, 4, 0),
-                GetComponent(conversionStorage, components, 5, 0), DateTimeKind.Utc).AddTicks(
-                    GetComponent(conversionStorage, components, 6, 0) * 10
-                );
+            // wday, yday, isdst and zone are ignored
+            return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
+        }
+
+        [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
+        [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
+        public static DateTime CreateGmtTime(object/*!*/ self, double second, double minute, double hour, double day, double month, double year,
+            object wday, object yday, object isdst, object zone) {
+
+            // wday, yday, isdst and zone are ignored
+            return new DateTime((int)year, (int)month, (int)day, (int)hour, (int)minute, (int)second, DateTimeKind.Utc);
+        }
+
+        [RubyMethod("utc", RubyMethodAttributes.PublicSingleton)]
+        [RubyMethod("gm", RubyMethodAttributes.PublicSingleton)]
+        public static DateTime CreateGmtTime(ConversionStorage<IntegerValue>/*!*/ conversionStorage, ConversionStorage<MutableString>/*!*/ stringCast,
+            object/*!*/ self, [NotNull]params object[]/*!*/ components) {
+
+            return CreateTime(conversionStorage, stringCast, self, DateTimeKind.Utc, components);
         }
 
         #endregion
 
         #endregion "Singleton Methods"
 
         #region _dump, _load
 
         [RubyMethod("_dump")]
         public static MutableString/*!*/ Dump(RubyContext/*!*/ context, DateTime self, [Optional]int depth) {
             if (self.Year < 1900) {
                 throw RubyExceptions.CreateTypeError("unable to marshal time");
             }
 
             uint dword1 = 0x80000000;
@@ -255,32 +340,32 @@ namespace IronRuby.Builtins {
 
         [RubyMethod("_load", RubyMethodAttributes.PublicSingleton)]
         public static DateTime Load(RubyContext/*!*/ context, object/*!*/ self, [NotNull]MutableString time) {
             byte[] data = time.ConvertToBytes();
             if (data.Length != 8 || (data[3] & 0x80) != 0x80) {
                 throw RubyExceptions.CreateTypeError("marshaled time format differ");
             }
             bool isUtc = (data[3] & 0x40) != 0;
             uint dword1 = GetUint(data, 0);
             int year = 1900 + (int)((dword1 >> 14) & 0xffff);
             int month = 1 + (int)((dword1 >> 10) & 0x0f);
             int day = (int)((dword1 >> 5) & 0x01f);
             int hour = (int)(dword1 & 0x01f);
 
             uint dword2 = GetUint(data, 4);
-            int minute = (int)((dword2 >> 26) & 0x2f);
-            int second = (int)((dword2 >> 20) & 0x2f);
+            int minute = (int)((dword2 >> 26) & 0x3f);
+            int second = (int)((dword2 >> 20) & 0x3f);
             int usec = (int)(dword2 & 0xfffff);
 
             try {
                 DateTime result = new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
                 result = result.AddTicks(usec * 10L);
                 if (!isUtc) {
                     result = result.ToLocalTime();
                 }
                 return result;
             } catch (ArgumentOutOfRangeException) {
                 throw RubyExceptions.CreateTypeError("marshaled time format differ");
             }
         }
 
         #endregion _dump, _load
diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs
index 25951a0..7052a2f 100644
--- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs
+++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs
@@ -6052,72 +6052,80 @@ namespace IronRuby.Builtins {
             
             module.DefineLibraryMethod("at", 0x61, 
                 new System.Func<System.Object, System.DateTime, System.DateTime>(IronRuby.Builtins.TimeOps.Create), 
                 new System.Func<System.Object, System.Double, System.DateTime>(IronRuby.Builtins.TimeOps.Create), 
                 new System.Func<System.Object, System.Int64, System.Int64, System.DateTime>(IronRuby.Builtins.TimeOps.Create)
             );
             
             module.DefineLibraryMethod("gm", 0x61, 
                 new System.Func<System.Object, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
-                new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, IronRuby.Runtime.RubyContext, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime)
+                new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
+                new System.Func<System.Object, System.Double, System.Double, System.Double, System.Double, System.Double, System.Double, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
+                new System.Func<IronRuby.Runtime.ConversionStorage<IronRuby.Runtime.IntegerValue>, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime)
             );
             
             module.DefineLibraryMethod("local", 0x61, 
                 new System.Func<System.Object, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
-                new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime)
+                new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
+                new System.Func<System.Object, System.Double, System.Double, System.Double, System.Double, System.Double, System.Double, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
+                new System.Func<IronRuby.Runtime.ConversionStorage<IronRuby.Runtime.IntegerValue>, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime)
             );
             
             module.DefineLibraryMethod("mktime", 0x61, 
                 new System.Func<System.Object, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
-                new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime)
+                new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
+                new System.Func<System.Object, System.Double, System.Double, System.Double, System.Double, System.Double, System.Double, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime), 
+                new System.Func<IronRuby.Runtime.ConversionStorage<IronRuby.Runtime.IntegerValue>, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateLocalTime)
             );
             
             module.DefineLibraryMethod("now", 0x61, 
                 new System.Func<System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateTime)
             );
             
             module.DefineLibraryMethod("today", 0x61, 
                 new System.Func<System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.Today)
             );
             
             module.DefineLibraryMethod("utc", 0x61, 
                 new System.Func<System.Object, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
                 new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
-                new System.Func<IronRuby.Runtime.ConversionStorage<System.Int32>, IronRuby.Runtime.RubyContext, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime)
+                new System.Func<System.Object, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
+                new System.Func<System.Object, System.Double, System.Double, System.Double, System.Double, System.Double, System.Double, System.Object, System.Object, System.Object, System.Object, System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime), 
+                new System.Func<IronRuby.Runtime.ConversionStorage<IronRuby.Runtime.IntegerValue>, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, System.Object, System.Object[], System.DateTime>(IronRuby.Builtins.TimeOps.CreateGmtTime)
             );
             
         }
         
         private static void LoadTrueClass_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
             module.DefineLibraryMethod("&", 0x51, 
                 new System.Func<System.Boolean, System.Object, System.Boolean>(IronRuby.Builtins.TrueClass.And), 
                 new System.Func<System.Boolean, System.Boolean, System.Boolean>(IronRuby.Builtins.TrueClass.And)
             );
             
             module.DefineLibraryMethod("^", 0x51, 
                 new System.Func<System.Boolean, System.Object, System.Boolean>(IronRuby.Builtins.TrueClass.Xor), 
                 new System.Func<System.Boolean, System.Boolean, System.Boolean>(IronRuby.Builtins.TrueClass.Xor)
             );
             


More information about the Ironruby-core mailing list