I'm compiling from source.

Sent from my iPhone

On Oct 28, 2009, at 1:31 AM, Shri Borde <shri.bo...@microsoft.com> wrote:

It’s a simple bug in the utc implementation. Time.utc (http://www.ruby-doc.org/core/classes/Time.html#M0002 52) gets passed in a number of arguments which are all ints except f or 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.



Time.utc(2000,"jan",1,20,15,1)



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

        end

      end

      old_utc(*args)

    end

  end

end



From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core- boun...@rubyforge.org] On Behalf Of James Thompson
Sent: Tuesday, October 27, 2009 10:03 AM
To: ironruby-core@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.


Thanks!

James Thompson
Plain Programs
New Orleans, LA

P: (502) 619.0353
E: ja...@plainprograms.com
W: www.plainprograms.com

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to