Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'development' of github.com:aptana/studio3-ruby into dev…

…elopment
  • Loading branch information...
commit cf78d0f647adb1b6ea91599cce526b2c39d71a5c 2 parents e02e8cf + 79dd223
Kevin Lindsey authored
View
2  plugins/com.aptana.editor.erb/src/com/aptana/editor/erb/html/outline/RHTMLOutlineLabelProvider.java
@@ -71,7 +71,7 @@ private String getDisplayText(ERBScript script)
String source = new String(fParseState.getSource());
// locates the ruby source
IRubyScript ruby = script.getScript();
- source = source.substring(ruby.getStartingOffset(), ruby.getEndingOffset());
+ source = source.substring(ruby.getStartingOffset(), ruby.getEndingOffset() + 1);
// gets the first line of the ruby source
StringTokenizer st = new StringTokenizer(source, "\n\r\f"); //$NON-NLS-1$
source = st.nextToken();
View
2  plugins/com.aptana.editor.erb/src/com/aptana/editor/erb/html/parsing/RHTMLParser.java
@@ -47,7 +47,7 @@ protected IParseNode processEmbeddedlanguage(IParseState parseState) throws Exce
if (root == null)
{
root = new ParseRootNode(IRubyConstants.CONTENT_TYPE_RUBY, new ParseNode[0], startingOffset,
- startingOffset + source.length());
+ startingOffset + source.length() - 1);
}
processRubyBlock(root);
break;
View
2  plugins/com.aptana.ruby.core/src/com/aptana/ruby/core/RubyParser.java
@@ -34,7 +34,7 @@ public IParseRootNode parse(IParseState parseState) throws Exception
{
String source = new String(parseState.getSource());
RubyScript root = new RubyScript(parseState.getStartingOffset(), parseState.getStartingOffset()
- + source.length());
+ + source.length() - 1);
RubyStructureBuilder builder = new RubyStructureBuilder(root);
SourceElementVisitor visitor = new SourceElementVisitor(builder);
View
4 tests/com.aptana.ruby.core.tests/src/com/aptana/ruby/core/RubyParserTest.java
@@ -172,7 +172,7 @@ public void testRegex() throws Exception
IParseNode result = fParser.parse(fParseState);
assertEquals(IRubyElement.SCRIPT, result.getNodeType());
assertEquals(0, result.getStartingOffset());
- assertEquals(59, result.getEndingOffset());
+ assertEquals(58, result.getEndingOffset());
}
public void testCase() throws Exception
@@ -182,7 +182,7 @@ public void testCase() throws Exception
IParseNode result = fParser.parse(fParseState);
assertEquals(0, result.getStartingOffset());
- assertEquals(60, result.getEndingOffset());
+ assertEquals(59, result.getEndingOffset());
}
public void testWhile() throws Exception
Please sign in to comment.
Something went wrong with that request. Please try again.