[Ironruby-core] Issue with ActionMailer that appears to run deep

Shri Borde Shri.Borde at microsoft.com
Wed Oct 28 02:31:26 EDT 2009

It’s a simple bug in the utc implementation. Time.utc (http://www.ruby-doc.org/core/classes/Time.html#M000252) gets passed in a number of arguments which are all ints except for the second one. The Time.utc implementation tries to convert all to an int, and fails when it gets a string for the second argument. The simple snippet below works with MRI but fails with IronRuby.


Are you able to build from source as described at http://wiki.github.com/ironruby/ironruby? If so, we can fix this and push the patch to github for you to pick up?

If not, you can workaround it by monkey-patching Time.utc with something like this:

class Time
  class << self
    @@months = ["jan", "feb", "mar", "apr", "may",
       "jun", "jul", "aug", "sep", "oct", "nov", "dec"]
    alias :old_utc :utc
    def utc(*args)
      if args.size >= 2
        if args[1].kind_of? String
          args[1] = @@months.index(args[1]) + 1

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of James Thompson
Sent: Tuesday, October 27, 2009 10:03 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Issue with ActionMailer that appears to run deep

I just posted an issue: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2946

It looks like something is going odd between the UTC method defined in TimeOps.cs and the RACC parser. Anyone who understands the internals better than I want to take a look at the stack trace I attached and tell me if I may be missing something?

This is blocking my deployment of a Rails app because using ActionMailer is giving me this.


James Thompson
Plain Programs
New Orleans, LA

P: (502) 619.0353
E: james at plainprograms.com<mailto:james at plainprograms.com>
W: www.plainprograms.com<http://www.plainprograms.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091028/0693c823/attachment.html>

More information about the Ironruby-core mailing list