natalie-lang / natalie

a work-in-progress Ruby compiler, written in Ruby and C++
https://natalie-lang.org
MIT License
931 stars 61 forks source link

Add String#byterindex #2193

Closed seven1m closed 2 months ago

seven1m commented 2 months ago

217

Unfortunately there are some bits of the spec that we cannot pass with our current Onigmo library. I think we will need the patches that CRuby has for Onigmo that haven't been upstreamed.

I'm hesitant to vendor all the regex code from CRuby in our repository, as keeping it up-to-date would be a real pain. If we get ambitious someday, maybe we can try to upstream some of the Ruby changes to Onigmo... If that's even possible. I don't know if it's simply that no one has had time to upstream the changes, or if CRuby has a true fork of Onigmo at this point. :grimacing:

In any case, I think this is good enough for now.