Seo's patch for building on mono

FYI I’m accepting part of the patch only. This won’t be accepted - if
folks want this to compile under Mono, please submit a patch that fixes
this correctly (new defines etc).

Index: src/microsoft.scripting.core/shell/BasicConsole.cs

protected void WriteColor(TextWriter output, string str, ConsoleColor c)
{
-#if !SILVERLIGHT // Console.ForegroundColor

  •        ConsoleColor origColor = Console.ForegroundColor;
    
  •        Console.ForegroundColor = c;
    

-#endif
output.Write(str);
output.Flush();

-#if !SILVERLIGHT // Console.ForegroundColor

  •        Console.ForegroundColor = origColor;
    

-#endif
}

Regarding the Mono compiler bug: will the latest mono c# compiler
compile these? I’m reluctant to change our sources

Index: src/ironruby/Builtins/RubyModule.cs

===================================================================

  •        _mixins = ArrayUtils.InsertAt(_mixins, 0, 
    

allModules.ToArray());

  •        _mixins = ArrayUtils.InsertAt<RubyModule>(_mixins, 0, 
    

allModules.ToArray());

Index: src/microsoft.scripting.core/utils/ArrayUtils.cs

===================================================================

  •        return InsertAt(MakeArray(list), index, items);
    
  •        return InsertAt<T>(MakeArray(list), index, items);
    

Thanks,
-John

2008/4/25, John L. (IRONRUBY) [email protected]:

FYI I’m accepting part of the patch only. This won’t be accepted – if folks
want this to compile under Mono, please submit a patch that fixes this
correctly (new defines etc).

(Regarding Mono console workaround and Mono compiler workaround)

I never expected otherwise. :slight_smile: Those workarounds are there for people
who want to try IronRuby on Mono right now. I never intended them to
be merged.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs