You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to run code with only debug flags and no braces (e.g. #dl) you get the following runtime error:
/Users/eamon/projects/Brain-Flak/stack.rb:51:in `include?': no implicit conversion of nil into String (TypeError)
from /Users/eamon/projects/Brain-Flak/stack.rb:51:in `is_opening_bracket?'
from /Users/eamon/projects/Brain-Flak/Interpreter.rb:135:in `step'
from brain_flak.rb:60:in `<main>'
This error occurs when the interpreter attempts to determine if the program starts with an opening bracket but discovers there is no program. It passes a nil object to the method is_opening_bracket, which then tries to convert that to a string. This error occurs on both the debug-flag-dev and master branches. This error only occurs with debug mode on.
The text was updated successfully, but these errors were encountered:
After commit 434b1a8 a program containing only debug flags no longer throws a runtime exception but rather a brain-flak error. It throws our good friend the Error at character 1: Invalid character ''..
If you try to run code with only debug flags and no braces (e.g.
#dl
) you get the following runtime error:This error occurs when the interpreter attempts to determine if the program starts with an opening bracket but discovers there is no program. It passes a
nil
object to the methodis_opening_bracket
, which then tries to convert that to a string. This error occurs on both the debug-flag-dev and master branches. This error only occurs with debug mode on.The text was updated successfully, but these errors were encountered: