Closed nirvdrum closed 2 years ago
rb_define_module_under
already supports that, see https://github.com/oracle/truffleruby/blob/7cc607338c2d83cb834f3f5afe0016af6e523f08/lib/truffle/stringio.rb#L31. So it should be fairly easy to support it for rb_define_class
too. PR welcome.
I meant to assign this to myself. I fixed it just recently as part of a larger PR to run the memcached gem.
Fixed by cb44f1b.
The last released version of memcached (1.8.0, released on 07-May-2014) defines a class with a lower-case name in a native extension.
rb_define_class
allows this, but TruffleRuby's implementation does not because it shares code with the Ruby side of things and performs name validation. This results in the gem being unable to load:The problematic code no longer exists in the memcached gem, but there hasn't been a release in over seven years. Even if we can convince the authors to release one, its master branch is set to 2.0.0.alpha, which would preclude it from an automatic update for most dependency graphs as it's a major version bump.