Created
November 19, 2010 00:22
-
-
Save leandrosilva/705943 to your computer and use it in GitHub Desktop.
A stupid Ruby scripting from a C# program on Mono 2.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dmcs -r:/opt/ironruby/bin/IronRuby.dll \ | |
-r:/opt/ironruby/bin/IronRuby.Libraries.dll \ | |
-r:/opt/ironruby/bin/Microsoft.Scripting.dll \ | |
-r:/opt/ironruby/bin/Microsoft.Scripting.Core.dll \ | |
program.cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Scripting.Hosting; | |
class Program { | |
static void Main(string[] args) | |
{ | |
ScriptEngine engine = IronRuby.Ruby.CreateEngine(); | |
ScriptSource source = engine.CreateScriptSourceFromString("puts 'Hello from IronRuby'"); | |
source.Execute(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MONO_PATH=$MONO_PATH:/opt/ironruby/bin/ | |
export MONO_PATH | |
mono program.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment