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

Move REPL implementation from bin/ to its own lib/ file + specs #2048

Merged
merged 4 commits into from
Dec 28, 2019

Conversation

elia
Copy link
Member

@elia elia commented Dec 27, 2019

The REPL has been living happily within the exe/ dir without specs or anything to check it was still working (but manual tests). It's time to give it the attention it deserves ✅

@elia elia self-assigned this Dec 27, 2019
Sometimes it makes sense and is more readable.
@elia elia force-pushed the elia/repl-rework branch 3 times, most recently from cf36568 to 62c418b Compare December 27, 2019 22:08
@elia elia marked this pull request as ready for review December 27, 2019 22:23
In this case for example ensure is clearly mirroring work done in the
preamble.

    def run_input_loop
      # on SIGINT lets just return from the loop..
      previous_trap = trap('SIGINT') { return }

      while (line = readline)
        run_line(line)
      end

    ensure
      trap('SIGINT', previous_trap || 'DEFAULT')
    end
Also add some specs to ensure it will keep working.
@elia elia added the repl label Dec 28, 2019
@elia elia merged commit 9e8827a into master Dec 28, 2019
@elia elia deleted the elia/repl-rework branch December 28, 2019 12:48
elia added a commit that referenced this pull request Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant