-
We are using Cosmos 4.5.0 and seem to see a quirk in the parsing used by ScriptRunner and TestRunner when there are hardcoded Ruby data structures in the procedure script. Here is an example: Error:
We seem to be able to workaround issues like this by moving brace or curly brace to previous line. Has this been seen before and if so, will it be corrected in Cosmos 5.0? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ScriptRunner instruments code so that it can catch exceptions, highlight lines, and log things. It does a really good job at this but there are some cases especially with brackets where it can do the wrong thing. The workaround is as you said, typically moving the brace up to the earlier line. The code that does this did change in COSMOS 5, (in particular it changed with Ruby 2.7). We use that same base code that is used by the Ruby irb tool to decide what can be done to any individual line. I tried to recreate this particular example in COSMOS 5 ScriptRunner and it worked just fine. There may still be edge cases like this though. |
Beta Was this translation helpful? Give feedback.
ScriptRunner instruments code so that it can catch exceptions, highlight lines, and log things. It does a really good job at this but there are some cases especially with brackets where it can do the wrong thing. The workaround is as you said, typically moving the brace up to the earlier line.
The code that does this did change in COSMOS 5, (in particular it changed with Ruby 2.7). We use that same base code that is used by the Ruby irb tool to decide what can be done to any individual line. I tried to recreate this particular example in COSMOS 5 ScriptRunner and it worked just fine. There may still be edge cases like this though.