This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
#229: type a line in main.rb th = Thread.new{while true do c+=1 end} and push ENTER. Redundant "end" generated below, editor does not show syntax error.
Same happens for the simpler while true do c+=1 end This occurs because in this case, the "do" does NOT have a matching "end"; apparently the grammar for while lets you have a newline, a colon or a do there. The same thing is true for until (until false do c+=1 end). I think the root bug here is that JRuby returns the wrong token for "do" in the above case - I get a Tokens.kDO instead of a Tokens.kDO_COND. Since I get a kDO I look for a matching "end", which "while" also does, so it's missing an extra end.
Reassigning this issue to newly created 'ruby' component.
This is fixed for the simpler case (while true do c +=1 end) but still broken for the case where while is not first on the line.
Try to put this code inline: th = Thread.new{while true do c+=1 end} then push enter in between while and true for example: th = Thread.new{while <enter> true do c+=1 end} It will produce sth like this th = Thread.new{while endtrue do c+=1 end}
Still valid, needs to be fixed in jruby-parser.
Still there. My previous comment about that this needs to be fixed in jruby-parser is not right; I guess the comment was meant for another issue.