Browse Source

Update IronRuby to version 1.1.1

pull/12/head
Matt Ward 15 years ago
parent
commit
65db65170c
  1. 8
      src/AddIns/BackendBindings/Ruby/IronRuby/README.txt
  2. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.Libraries.Yaml.dll
  3. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.Libraries.dll
  4. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.dll
  5. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Dynamic.dll
  6. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.Debugging.dll
  7. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.Metadata.dll
  8. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.dll
  9. BIN
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/ir.exe
  10. 17
      src/AddIns/BackendBindings/Ruby/IronRuby/bin/ir.exe.config
  11. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding.sln
  12. 4
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj
  13. 35
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyAstWalker.cs
  14. 26
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyCodeDeserializer.cs
  15. 1
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyConsoleApplication.cs
  16. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyControlFieldExpression.cs
  17. 4
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/ConsoleProject.xpt
  18. 4
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/FormsProject.xpt
  19. 4
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFApplication.xpt
  20. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Gui/DebugRunRubyCommandTests.cs
  21. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Gui/RunRubyCommandTests.cs
  22. 4
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Parsing/ParseClassMethodWithBodyTestFixture.cs
  23. 10
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyConsoleApplicationTests.cs
  24. 1
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestDebuggerRunsSelectedTestMethodTestFixture.cs
  25. 5
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestRunnerApplicationTests.cs
  26. 1
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestRunnerRunsSelectedTestMethodTestFixture.cs
  27. 3
      src/Setup/Files.wxs
  28. 1
      src/Setup/Setup.wxs

8
src/AddIns/BackendBindings/Ruby/IronRuby/README.txt

@ -7,12 +7,15 @@ Authors:
Dino Viehland, and everyone else from the community who reports bugs, Dino Viehland, and everyone else from the community who reports bugs,
builds libraries, and helps enrich IronRuby. builds libraries, and helps enrich IronRuby.
Project Contact: Jimmy Schementi <jimmy@schementi.com> Project Contacts:
Jimmy Schementi <jschementi@gmail.com>
Miguel de Icaza <miguel@gnome.org>
Tomas Matousek <tomas_matousek@hotmail.com>
== About == About
IronRuby is a Open Source implementation of the Ruby programming language IronRuby is a Open Source implementation of the Ruby programming language
(http://www.ruby-lang.org) for .NET, heavily relying on Microsoft's (http://www.ruby-lang.org) for .NET, heavily relying on the
Dynamic Language Runtime (http://dlr.codeplex.com). Dynamic Language Runtime (http://dlr.codeplex.com).
The project's #1 goal is to be a true Ruby implementation, meaning it runs The project's #1 goal is to be a true Ruby implementation, meaning it runs
@ -34,7 +37,6 @@ Will run rubyfile.rb with the IronRuby compiler.
/bin IronRuby binaries, ir.exe, iirb, irake, igem, iri, irdoc, etc. /bin IronRuby binaries, ir.exe, iirb, irake, igem, iri, irdoc, etc.
/lib Ruby standard library, including RubyGems /lib Ruby standard library, including RubyGems
/silverlight Silverlight binaries and scripts
CHANGELOG.txt Changes for each release CHANGELOG.txt Changes for each release
RELEASE.txt Release notes RELEASE.txt Release notes
LICENSE.Ruby.txt Ruby license LICENSE.Ruby.txt Ruby license

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.Libraries.Yaml.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.Libraries.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/IronRuby.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Dynamic.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.Debugging.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.Metadata.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/Microsoft.Scripting.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Ruby/IronRuby/bin/ir.exe

Binary file not shown.

17
src/AddIns/BackendBindings/Ruby/IronRuby/bin/ir.exe.config

@ -1,17 +0,0 @@
<?xml version='1.0'?>
<configuration>
<configSections>
<section name='microsoft.scripting' type='Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.1.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' requirePermission='false'/>
</configSections>
<microsoft.scripting>
<languages>
<language names='IronPython;Python;py' extensions='.py' displayName='IronPython 2.7 Alpha 1' type='IronPython.Runtime.PythonContext, IronPython, Version=2.7.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'/>
<language names='IronRuby;Ruby;rb' extensions='.rb' displayName='IronRuby' type='IronRuby.Runtime.RubyContext, IronRuby, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'/>
</languages>
<options>
<set language='Ruby' option='LibraryPaths' value='..\lib\IronRuby;..\lib\ruby\site_ruby\1.8;..\lib\ruby\site_ruby;..\lib\ruby\1.8'/>
</options>
</microsoft.scripting>
</configuration>

2
src/AddIns/BackendBindings/Ruby/RubyBinding.sln

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
# SharpDevelop 4.0.0.6737 # SharpDevelop 4.0.0.6808
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding.Tests", "RubyBinding\Test\RubyBinding.Tests.csproj", "{01DF0475-0CB2-4E81-971B-BADC60CDE3A5}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding.Tests", "RubyBinding\Test\RubyBinding.Tests.csproj", "{01DF0475-0CB2-4E81-971B-BADC60CDE3A5}"

4
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj

@ -136,10 +136,6 @@
<Link>Chiron.exe.config</Link> <Link>Chiron.exe.config</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="..\..\IronRuby\bin\ir.exe.config">
<Link>ir.exe.config</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\IronRuby\LICENSE.APACHE.html"> <None Include="..\..\IronRuby\LICENSE.APACHE.html">
<Link>LICENSE.APACHE.html</Link> <Link>LICENSE.APACHE.html</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

35
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyAstWalker.cs

@ -17,6 +17,11 @@ namespace ICSharpCode.RubyBinding
{ {
public class RubyAstWalker : Walker public class RubyAstWalker : Walker
{ {
/// <summary>
/// Length of "def".
/// </summary>
const int MethodDefinitionLength = 3;
DefaultCompilationUnit compilationUnit; DefaultCompilationUnit compilationUnit;
DefaultClass currentClass; DefaultClass currentClass;
DefaultClass globalClass; DefaultClass globalClass;
@ -146,13 +151,35 @@ namespace ICSharpCode.RubyBinding
/// </summary> /// </summary>
DomRegion GetMethodRegion(MethodDefinition methodDef) DomRegion GetMethodRegion(MethodDefinition methodDef)
{ {
SourceLocation parametersEndLocation = methodDef.Parameters.Location.End; SourceLocation parametersEndLocation = GetParametersEndLocation(methodDef);
if (ParametersEndLocationNeedsCorrecting(parametersEndLocation)) {
parametersEndLocation = CorrectParametersEndLocation(parametersEndLocation);
}
return CreateRegion(methodDef.Location.Start, parametersEndLocation); return CreateRegion(methodDef.Location.Start, parametersEndLocation);
} }
SourceLocation GetParametersEndLocation(MethodDefinition methodDef)
{
SourceLocation parametersEndLocation = methodDef.Parameters.Location.End;
if (parametersEndLocation.IsValid) {
if (ParametersEndLocationNeedsCorrecting(parametersEndLocation)) {
parametersEndLocation = CorrectParametersEndLocation(parametersEndLocation);
}
} else {
return GetParametersEndLocationBasedOnMethodNameEnd(methodDef);
}
return parametersEndLocation;
}
SourceLocation GetParametersEndLocationBasedOnMethodNameEnd(MethodDefinition methodDef)
{
const int methodParenthesesLength = 2;
const int spaceLength = 1;
int methodDefinitionLength = methodDef.Name.Length + MethodDefinitionLength + methodParenthesesLength + spaceLength;
SourceLocation methodStartLocation = methodDef.Location.Start;
int index = methodStartLocation.Index + methodDefinitionLength;
int column = methodStartLocation.Column + methodDefinitionLength;
int line = methodStartLocation.Line;
return new SourceLocation(index, line, column);
}
/// <summary> /// <summary>
/// Returns true if the IronRuby parser has not found the closing bracket for a method /// Returns true if the IronRuby parser has not found the closing bracket for a method
/// and moved to the next line. /// and moved to the next line.

26
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyCodeDeserializer.cs

@ -52,9 +52,10 @@ namespace ICSharpCode.RubyBinding
public object Deserialize(string name, MethodCall methodCall) public object Deserialize(string name, MethodCall methodCall)
{ {
if (methodCall.Target is ArrayItemAccess) { if ("new".Equals(methodCall.MethodName, StringComparison.InvariantCultureIgnoreCase)) {
return DeserializeCreateArrayExpression(name, methodCall); if (IsArrayCreation(methodCall)) {
} else if ("new".Equals(methodCall.MethodName, StringComparison.InvariantCultureIgnoreCase)) { return DeserializeCreateArrayExpression(name, methodCall);
}
return CreateInstance(name, methodCall); return CreateInstance(name, methodCall);
} else if ("|".Equals(methodCall.MethodName)) { } else if ("|".Equals(methodCall.MethodName)) {
return DeserializeBitwiseOr(methodCall); return DeserializeBitwiseOr(methodCall);
@ -62,11 +63,20 @@ namespace ICSharpCode.RubyBinding
return CreateInstance(name, methodCall); return CreateInstance(name, methodCall);
} }
bool IsArrayCreation(MethodCall methodCall)
{
MethodCall targetMethodCall = methodCall.Target as MethodCall;
if (targetMethodCall != null) {
return targetMethodCall.MethodName == "[]";
}
return false;
}
public static object Deserialize(StringConstructor stringConstructor) public static object Deserialize(StringConstructor stringConstructor)
{ {
if (stringConstructor.Parts.Count > 0) { if (stringConstructor.Parts.Count > 0) {
StringLiteral literal = stringConstructor.Parts[0] as StringLiteral; StringLiteral literal = stringConstructor.Parts[0] as StringLiteral;
MutableString mutableString = literal.GetMutableString(RubyEncoding.UTF8); MutableString mutableString = literal.GetMutableString();
return mutableString.ConvertToString(); return mutableString.ConvertToString();
} }
return String.Empty; return String.Empty;
@ -171,7 +181,7 @@ namespace ICSharpCode.RubyBinding
Type GetType(RubyControlFieldExpression field) Type GetType(RubyControlFieldExpression field)
{ {
string typeName = field.FullMemberName; string typeName = field.FullMemberName;
if (!string.IsNullOrEmpty(typeName)) { if (!String.IsNullOrEmpty(typeName)) {
return componentCreator.GetType(typeName); return componentCreator.GetType(typeName);
} }
return null; return null;
@ -184,8 +194,8 @@ namespace ICSharpCode.RubyBinding
/// </summary> /// </summary>
object DeserializeCreateArrayExpression(string name, MethodCall methodCall) object DeserializeCreateArrayExpression(string name, MethodCall methodCall)
{ {
ArrayItemAccess arrayAccess = methodCall.Target as ArrayItemAccess; MethodCall arrayCreationMethodCall = methodCall.Target as MethodCall;
ConstantVariable constantVariable = arrayAccess.Arguments.Expressions[0] as ConstantVariable; ConstantVariable constantVariable = arrayCreationMethodCall.Arguments.Expressions[0] as ConstantVariable;
string arrayTypeName = RubyControlFieldExpression.GetQualifiedName(constantVariable); string arrayTypeName = RubyControlFieldExpression.GetQualifiedName(constantVariable);
ArrayConstructor arrayConstructor = methodCall.Arguments.Expressions[0] as ArrayConstructor; ArrayConstructor arrayConstructor = methodCall.Arguments.Expressions[0] as ArrayConstructor;
@ -198,7 +208,7 @@ namespace ICSharpCode.RubyBinding
object instance = Deserialize(arrayItemExpression); object instance = Deserialize(arrayItemExpression);
array.SetValue(instance, i); array.SetValue(instance, i);
} }
return array; return array;
} }
object Deserialize(SelfReference selfRef) object Deserialize(SelfReference selfRef)

1
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyConsoleApplication.cs

@ -31,6 +31,7 @@ namespace ICSharpCode.RubyBinding
protected override void AddArguments(ScriptingCommandLineBuilder commandLine) protected override void AddArguments(ScriptingCommandLineBuilder commandLine)
{ {
commandLine.AppendOption("--disable-gems");
commandLine.AppendBooleanOptionIfTrue("-D", Debug); commandLine.AppendBooleanOptionIfTrue("-D", Debug);
AppendLoadPaths(commandLine); AppendLoadPaths(commandLine);
commandLine.AppendQuotedStringIfNotEmpty(ScriptFileName); commandLine.AppendQuotedStringIfNotEmpty(ScriptFileName);

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyControlFieldExpression.cs

@ -286,7 +286,7 @@ namespace ICSharpCode.RubyBinding
MethodCall clrMemberMethodCall = methodCall.Target as MethodCall; MethodCall clrMemberMethodCall = methodCall.Target as MethodCall;
SymbolLiteral literal = clrMemberMethodCall.Arguments.Expressions[1] as SymbolLiteral; SymbolLiteral literal = clrMemberMethodCall.Arguments.Expressions[1] as SymbolLiteral;
MutableString mutableString = literal.GetMutableString(RubyEncoding.UTF8); MutableString mutableString = literal.GetMutableString();
string methodBeingCalledByClrMemberMethod = mutableString.ConvertToString(); string methodBeingCalledByClrMemberMethod = mutableString.ConvertToString();
// Remove two members since these are 'clr_member' and 'call'. // Remove two members since these are 'clr_member' and 'call'.

4
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/ConsoleProject.xpt

@ -22,14 +22,14 @@
<PropertyGroup configuration="Debug" escapeValue="false"> <PropertyGroup configuration="Debug" escapeValue="false">
<DebugInfo>True</DebugInfo> <DebugInfo>True</DebugInfo>
<StartArguments>-1.9 -D Program.rb</StartArguments> <StartArguments>--disable-gems -D Program.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>
</PropertyGroup> </PropertyGroup>
<PropertyGroup configuration="Release" escapeValue="false"> <PropertyGroup configuration="Release" escapeValue="false">
<StartArguments>-1.9 Program.rb</StartArguments> <StartArguments>--disable-gems Program.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>

4
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/FormsProject.xpt

@ -21,14 +21,14 @@
<PropertyGroup configuration="Debug" escapeValue="false"> <PropertyGroup configuration="Debug" escapeValue="false">
<DebugInfo>True</DebugInfo> <DebugInfo>True</DebugInfo>
<StartArguments>-1.9 -D Program.rb</StartArguments> <StartArguments>--disable-gems -D Program.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>
</PropertyGroup> </PropertyGroup>
<PropertyGroup configuration="Release" escapeValue="false"> <PropertyGroup configuration="Release" escapeValue="false">
<StartArguments>-1.9 Program.rb</StartArguments> <StartArguments>--disable-gems Program.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>

4
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Templates/WPFApplication.xpt

@ -19,7 +19,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<MainFile>Application.rb</MainFile> <MainFile>Application.rb</MainFile>
<DebugInfo>True</DebugInfo> <DebugInfo>True</DebugInfo>
<StartArguments>-1.9 -D Application.rb</StartArguments> <StartArguments>--disable-gems -D Application.rb</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>
@ -28,7 +28,7 @@
<PropertyGroup configuration="Release" escapeValue="false"> <PropertyGroup configuration="Release" escapeValue="false">
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<MainFile>Application.rb</MainFile> <MainFile>Application.rb</MainFile>
<StartArguments>-1.9 Application.py</StartArguments> <StartArguments>--disable-gems Application.py</StartArguments>
<StartWorkingDirectory>.\</StartWorkingDirectory> <StartWorkingDirectory>.\</StartWorkingDirectory>
<StartAction>Program</StartAction> <StartAction>Program</StartAction>
<StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram> <StartProgram>${addinpath:ICSharpCode.RubyBinding}\ir.exe</StartProgram>

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Gui/DebugRunRubyCommandTests.cs

@ -52,7 +52,7 @@ namespace RubyBinding.Tests.Gui
public void Run_RubyFileOpen_ProcessInfoArgsHasDebugArgument() public void Run_RubyFileOpen_ProcessInfoArgsHasDebugArgument()
{ {
string arguments = debugger.ProcessStartInfo.Arguments; string arguments = debugger.ProcessStartInfo.Arguments;
string expectedArguments = "-D \"test.rb\""; string expectedArguments = "--disable-gems -D \"test.rb\"";
Assert.AreEqual(expectedArguments, arguments); Assert.AreEqual(expectedArguments, arguments);
} }

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Gui/RunRubyCommandTests.cs

@ -62,7 +62,7 @@ namespace RubyBinding.Tests.Gui
public void Run_RubyFileOpen_ProcessInfoArgsContainsFileNameActiveInTextEditor() public void Run_RubyFileOpen_ProcessInfoArgsContainsFileNameActiveInTextEditor()
{ {
string arguments = debugger.ProcessStartInfo.Arguments; string arguments = debugger.ProcessStartInfo.Arguments;
string expectedArguments = "/c \"\"C:\\IronRuby\\ir.exe\" \"test.rb\"\" & pause"; string expectedArguments = "/c \"\"C:\\IronRuby\\ir.exe\" --disable-gems \"test.rb\"\" & pause";
Assert.AreEqual(expectedArguments, arguments); Assert.AreEqual(expectedArguments, arguments);
} }

4
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Parsing/ParseClassMethodWithBodyTestFixture.cs

@ -68,7 +68,7 @@ namespace RubyBinding.Tests.Parsing
public void MethodBodyRegion() public void MethodBodyRegion()
{ {
int startLine = 2; int startLine = 2;
int startColumn = 11; // IronRuby parser includes the as part of the method parameters int startColumn = 11;
int endLine = 4; int endLine = 4;
int endColumn = 5; int endColumn = 5;
DomRegion region = new DomRegion(startLine, startColumn, endLine, endColumn); DomRegion region = new DomRegion(startLine, startColumn, endLine, endColumn);
@ -84,7 +84,7 @@ namespace RubyBinding.Tests.Parsing
int startLine = 2; int startLine = 2;
int startColumn = 2; int startColumn = 2;
int endLine = 2; int endLine = 2;
int endColumn = 11; // IronRuby parser includes the as part of the method parameters int endColumn = 11;
DomRegion region = new DomRegion(startLine, startColumn, endLine, endColumn); DomRegion region = new DomRegion(startLine, startColumn, endLine, endColumn);
Assert.AreEqual(region.ToString(), method.Region.ToString()); Assert.AreEqual(region.ToString(), method.Region.ToString());
} }

10
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyConsoleApplicationTests.cs

@ -33,11 +33,11 @@ namespace RubyBinding.Tests.Testing
} }
[Test] [Test]
public void GetArguments_DebugIsTrue_ReturnsDebugOption() public void GetArguments_DebugIsTrue_ReturnsDisableGemsAndDebugOption()
{ {
app.Debug = true; app.Debug = true;
string args = app.GetArguments(); string args = app.GetArguments();
string expectedCommandLine = "-D"; string expectedCommandLine = "--disable-gems -D";
Assert.AreEqual(expectedCommandLine, args); Assert.AreEqual(expectedCommandLine, args);
} }
@ -47,7 +47,7 @@ namespace RubyBinding.Tests.Testing
{ {
app.ScriptFileName = @"d:\projects\my ruby\test.rb"; app.ScriptFileName = @"d:\projects\my ruby\test.rb";
string args = app.GetArguments(); string args = app.GetArguments();
string expectedCommandLine = "\"d:\\projects\\my ruby\\test.rb\""; string expectedCommandLine = "--disable-gems \"d:\\projects\\my ruby\\test.rb\"";
Assert.AreEqual(expectedCommandLine, args); Assert.AreEqual(expectedCommandLine, args);
} }
@ -61,7 +61,7 @@ namespace RubyBinding.Tests.Testing
string args = app.GetArguments(); string args = app.GetArguments();
string expectedCommandLine = string expectedCommandLine =
"-D \"d:\\projects\\my ruby\\test.rb\" -- responseFile.txt"; "--disable-gems -D \"d:\\projects\\my ruby\\test.rb\" -- responseFile.txt";
Assert.AreEqual(expectedCommandLine, args); Assert.AreEqual(expectedCommandLine, args);
} }
@ -80,7 +80,7 @@ namespace RubyBinding.Tests.Testing
{ {
app.Debug = true; app.Debug = true;
ProcessStartInfo startInfo = app.GetProcessStartInfo(); ProcessStartInfo startInfo = app.GetProcessStartInfo();
string expectedCommandLine = "-D"; string expectedCommandLine = "--disable-gems -D";
Assert.AreEqual(expectedCommandLine, startInfo.Arguments); Assert.AreEqual(expectedCommandLine, startInfo.Arguments);
} }

1
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestDebuggerRunsSelectedTestMethodTestFixture.cs

@ -115,6 +115,7 @@ namespace RubyBinding.Tests.Testing
RunTestsOnSelectedTestMethod(); RunTestsOnSelectedTestMethod();
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"-D " + "-D " +
"\"-Ic:\\sharpdevelop\\addins\\rubybinding\\TestRunner\" " + "\"-Ic:\\sharpdevelop\\addins\\rubybinding\\TestRunner\" " +
"\"c:\\sharpdevelop\\addins\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\sharpdevelop\\addins\\rubybinding\\TestRunner\\sdtest.rb\" " +

5
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestRunnerApplicationTests.cs

@ -52,6 +52,7 @@ namespace RubyBinding.Tests.Testing
ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests); ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests);
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\rubybinding\\TestRunner\" " + "\"-Ic:\\rubybinding\\TestRunner\" " +
"\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " +
"--testcase=MyTests " + "--testcase=MyTests " +
@ -77,6 +78,7 @@ namespace RubyBinding.Tests.Testing
ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests); ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests);
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\rubybinding\\TestRunner\" " + "\"-Ic:\\rubybinding\\TestRunner\" " +
"\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " +
"--name=MyMethod " + "--name=MyMethod " +
@ -99,6 +101,7 @@ namespace RubyBinding.Tests.Testing
ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests); ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests);
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\rubybinding\\AddIns\\TestRunner\" " + "\"-Ic:\\rubybinding\\AddIns\\TestRunner\" " +
"\"c:\\rubybinding\\AddIns\\TestRunner\\sdtest.rb\" " + "\"c:\\rubybinding\\AddIns\\TestRunner\\sdtest.rb\" " +
"-- " + "-- " +
@ -117,6 +120,7 @@ namespace RubyBinding.Tests.Testing
ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests); ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(selectedTests);
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\ruby\\lib\" " + "\"-Ic:\\ruby\\lib\" " +
"\"-Ic:\\rubybinding\\TestRunner\" " + "\"-Ic:\\rubybinding\\TestRunner\" " +
"\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " +
@ -148,6 +152,7 @@ namespace RubyBinding.Tests.Testing
ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(tests); ProcessStartInfo processStartInfo = GetProcessStartInfoFromTestRunnerApp(tests);
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\rubybinding\\TestRunner\" " + "\"-Ic:\\rubybinding\\TestRunner\" " +
"\"-Ic:\\projects\\rbproject\" " + "\"-Ic:\\projects\\rbproject\" " +
"\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\rubybinding\\TestRunner\\sdtest.rb\" " +

1
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Testing/RubyTestRunnerRunsSelectedTestMethodTestFixture.cs

@ -96,6 +96,7 @@ namespace RubyBinding.Tests.Testing
RunTestsOnSelectedTestMethod(); RunTestsOnSelectedTestMethod();
string expectedCommandLine = string expectedCommandLine =
"--disable-gems " +
"\"-Ic:\\sharpdevelop\\addins\\rubybinding\\TestRunner\" " + "\"-Ic:\\sharpdevelop\\addins\\rubybinding\\TestRunner\" " +
"\"c:\\sharpdevelop\\addins\\rubybinding\\TestRunner\\sdtest.rb\" " + "\"c:\\sharpdevelop\\addins\\rubybinding\\TestRunner\\sdtest.rb\" " +
"--name=MyTestMethod " + "--name=MyTestMethod " +

3
src/Setup/Files.wxs

@ -1111,9 +1111,6 @@
<Component Guid="7CB6802E-BC09-4796-904C-45EEAD91A5CF" Id="IrExe" DiskId="1"> <Component Guid="7CB6802E-BC09-4796-904C-45EEAD91A5CF" Id="IrExe" DiskId="1">
<File Source="..\..\AddIns\BackendBindings\RubyBinding\ir.exe" Name="ir.exe" Id="ir.exe" KeyPath="yes" Assembly=".net" AssemblyApplication="ir.exe" AssemblyManifest="ir.exe" /> <File Source="..\..\AddIns\BackendBindings\RubyBinding\ir.exe" Name="ir.exe" Id="ir.exe" KeyPath="yes" Assembly=".net" AssemblyApplication="ir.exe" AssemblyManifest="ir.exe" />
</Component> </Component>
<Component Guid="2F7C175B-7CCD-46D2-9B4E-A942CA14145B" Id="IrExeConfig" DiskId="1">
<File Source="..\..\AddIns\BackendBindings\RubyBinding\ir.exe.config" Name="ir.exe.config" Id="ir.exe.config" KeyPath="yes" />
</Component>
<Component Guid="1CE0CC65-3534-4357-BFB7-CB9F0C4E1495" Id="IronRubyDll" DiskId="1"> <Component Guid="1CE0CC65-3534-4357-BFB7-CB9F0C4E1495" Id="IronRubyDll" DiskId="1">
<File Source="..\..\AddIns\BackendBindings\RubyBinding\IronRuby.dll" Name="IronRuby.dll" Id="IronRuby.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronRuby.dll" AssemblyManifest="IronRuby.dll" /> <File Source="..\..\AddIns\BackendBindings\RubyBinding\IronRuby.dll" Name="IronRuby.dll" Id="IronRuby.dll" KeyPath="yes" Assembly=".net" AssemblyApplication="IronRuby.dll" AssemblyManifest="IronRuby.dll" />
</Component> </Component>

1
src/Setup/Setup.wxs

@ -421,7 +421,6 @@
<ComponentRef Id="PythonBindingSdTestRunnerPy"/> <ComponentRef Id="PythonBindingSdTestRunnerPy"/>
<ComponentRef Id="IrExe"/> <ComponentRef Id="IrExe"/>
<ComponentRef Id="IrExeConfig"/>
<ComponentRef Id="IronRubyDll"/> <ComponentRef Id="IronRubyDll"/>
<ComponentRef Id="IronRubyLibrariesDll"/> <ComponentRef Id="IronRubyLibrariesDll"/>
<ComponentRef Id="IronRubyLicenseApacheHtml"/> <ComponentRef Id="IronRubyLicenseApacheHtml"/>

Loading…
Cancel
Save