C# Paste by Anonymous
Description: None
Page views: 325
Hide line numbers

Create new paste
Post a reply
View replies

Paste:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
ScriptRuntime runtime = Ruby.CreateRuntime();
ScriptEngine engine = Ruby.GetEngine(runtime);
Dictionary<string, object> variables = new Dictionary<string,object>();
ScriptScope scope = engine.CreateScope(variables);
            
string script =
@"
puts 'Vincent! We happy?'

def test
    puts 'Yeah, we happy.'    
end
test
";
engine.Execute(script, scope);

Replies:
No replies posted yet

Post a Reply: