ruby / TryRuby

This 4th iteration of TryRuby is a website where you can learn the Ruby language.
https://try.ruby-lang.org
MIT License
224 stars 97 forks source link

Error in try_ruby_190.md not working #158

Open onichama opened 1 year ago

onichama commented 1 year ago

The file try_ruby_190.md defines an error message. However, I can't get this error message to pop up. The answer regex probably needs to be different.

lang: EN title: Sadly, You Hate Toast Poetry answer: (toast){0} load: prev ok: Excellent error: Still smells like toast to me

hmdne commented 10 months ago

we could do honeydew[\s\S]*?honeydew. This protects from use of sub as well.

hmdne commented 10 months ago

Hm. Course says to use anything except of toast... Maybe this would work better: /\A([\s\S](?!toast))*\z/

hmdne commented 10 months ago

This could be a better idea if we were to catch toast as the first word: \A((?<!toast)[\s\S])*\z