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

Output of command only works once #49

Closed
beanilsson opened this issue May 24, 2017 · 2 comments · Fixed by #50
Closed

Output of command only works once #49

beanilsson opened this issue May 24, 2017 · 2 comments · Fixed by #50

Comments

@beanilsson
Copy link

This is what happens when I'm trying to execute small code pieces within icr:
screen shot 2017-05-24 at 14 45 46

I only get an output on the first attempt. I'm running crystal within an Ubuntu Vagrant box.

@beanilsson
Copy link
Author

beanilsson commented May 24, 2017

I just realised that the mistake was my own. One cannot use single quotes for strings in crystal, but double quotes should be used. Funny though how icr seems to freeze when single quotes are used, that ought to be a bug? Maybe there should be some sort of error message printed to the user as well? Like: Double quotes must be used. And then prompting for new input.

@jwoertink
Copy link
Collaborator

The bug is that you used the Char literal and not String literal. Crystal throws an error for that I believe, so we just need to catch that error and return it. That should be an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants