Using readline in Ruby fails with the message 'Expected prompt ("$ ") but received "▽"'

I use Readline for the Ruby shell challenge: Readline.readline('$ ', true)

This works on my machine (OSX), but it fails when running codecrafters test. The error message is ‘Expected prompt ("$ ") but received “▽”’.

Output:

[tester::#QP2] Running tests for Stage #QP2 (Autocompletion - Builtin completion)
[tester::#QP2] Running ./your_program.sh
[your-program] ▽
[tester::#QP2] Expected prompt ("$ ") but received "▽"

Hey @mbraak, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

I added a Github repository: GitHub - mbraak/codecrafters-shell-ruby

Likely something wonky with our tester here, we’re investigating! (cc: @Arpan-206)

This has been fixed!
Thanks for the patience!

1 Like

Thanks for fixing.