Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby Syntax Error Checker Hangs Test Runner #1081

spmartinapl opened this issue Nov 6, 2019 · 2 comments · Fixed by #1082

Ruby Syntax Error Checker Hangs Test Runner #1081

spmartinapl opened this issue Nov 6, 2019 · 2 comments · Fixed by #1082


Copy link

spmartinapl commented Nov 6, 2019

The Test Runner fails to open on certain Ruby syntax errors, specifically missing end curly braces in puts statements that include variables.

puts "#{foo" for example.

Steps to reproduce the behavior

  1. Create a test group which has a puts statement syntax error like below (missing curly end brace)
    puts "#{foo
  2. Load Test Runner.
  3. It should fail to open and hang on the below screen. The syntax error, however, is not reported.

Expected behavior
For comparison, vanilla ruby fails in the follow manner when I try to run a script with the same syntax error. See below for the test script.

def syntax_test
    foo = 12
    puts "Hello"
    puts "Hello #{foo"
    puts "Done"

See below for the syntax error thrown.


  • OS: Ubuntu v18.04.3 LTS
  • COSMOS v4.4.0
@ghost ghost self-assigned this Nov 6, 2019
@ghost ghost added the bug label Nov 6, 2019
Copy link

ghost commented Nov 6, 2019

@spmartinapl You can test my fix by going to line 523 of lib/cosmos/tools/script_runner/script_runner_frame.rb and adding:
eval("lambda { #{text} }")

To find the file click Help->About and clicking "Open COSMOS Gem Code"

Copy link

spmartinapl commented Nov 6, 2019

This line appears to fix the problem. Thanks!

@ghost ghost closed this as completed in #1082 Nov 18, 2019
@ryanmelt ryanmelt modified the milestones: Release Independent, v4.4.1 Dec 31, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants