0.26.1
somewhat minimal example:
$ cat file.cr
"" =~ /(abc)/
{a: $1, b: $2}
$ /usr/bin/crystal file.cr
Unhandled exception: Nil assertion failed (Exception)
from /usr/share/crystal/src/class.cr:148:0 in 'not_nil!'
from file.cr:0:5 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:97:5 in 'main_user_code'
from /usr/share/crystal/src/crystal/main.cr:86:7 in 'main'
from /usr/share/crystal/src/crystal/main.cr:106:3 in 'main'
from __libc_start_main
from ???
notice the "file.cr:0:5", not quite sure what line 0 means...wasn't sure if this is a dupe of other issues or not.
Related to #5567.
The message Nil assertion failed is also not very detailed for this kind of error. Uers might have a hard time to understand what it means in this context.
this particular example seems fixed with 0.31.1. Feel free to close or leave open if you want to address the cryptic message at some point :)
Fixed in #8234
The error message should better be a separate issue.
There is already #4776 to track the error message/error behaviour.