Truffleruby: String#split with block incompatibility

Created on 18 Jul 2020  路  3Comments  路  Source: oracle/truffleruby

MRI behavior:

"a b".split(" ", &proc{})
#=> "a b"

TruffleRuby (head):

"a b".split(" ", &proc{})
#=> ["a", "b"]

Looks like this change from 2.6 hasn't been implemented: https://rubyreferences.github.io/rubychanges/2.6.html#stringsplit-with-block (though TruffleRuby "says" its RUBY_VERSION is 2.6).

This behaviour is covered by ruby/spec but it seems that these tests are disabled.

compatibility

All 3 comments

though TruffleRuby "says" its RUBY_VERSION is 2.6

Yes, we don't wait for 100% compatibility before claiming to be the new Ruby version. We set the version to what we aspire to be, import the code from MRI, and then work back through the issues over time. That might change when we become more stable, but while everything is still being developed I think it makes sense.

but it seems that these tests are disabled.

Tagged as failing, rather than disabled, but yes.

https://github.com/oracle/truffleruby/blob/9f03f3c84387257dee80c1fa74b7a52deed2007c/spec/tags/core/string/split_tags.txt#L1

we don't wait for 100% compatibility before claiming to be the new Ruby version

Makes sense.

I just need an issue to track when it's resolved and I can remove workarounds 馃檪

@eregon could you assign the issue on me, please?

Was this page helpful?
0 / 5 - 0 ratings