You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JRuby version: jruby 220.127.116.11 (2.5.0) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.172-b11 on 1.8.0_172-b11 +indy +jit [linux-x86_64]
Operating system and platform: Arch Linux Linux wes-thinkpad 4.16.13-1-ARCH #1 SMP PREEMPT Thu May 31 23:29:29 UTC 2018 x86_64 GNU/Linux
This is more of an observed difference between MRI Ruby and jruby 18.104.22.168, which I'm not sure is incorrect but the difference tripped up some code in our code base, so I thought I'd point it out. For the purposes of this report the expected behaviour is to be the same as MRI but I understand the difference might be allowed.
Expected behaviour is encoding of string returned by name on a class to be encoded the same as MRI (2.5.1, 2.6.0-preview2):
Ah a regression from fixing all our encoding issues. Ironic. when we register class names we have no eager symbol and it bubbles down to calculateRubyName which calls runtime.newString() which will set encoding to ASCII-8BIT (because default ByteList constructor assumes this encoding).
Our solution will be to be a bit smarter about this encoding because any class which is 7bit clean regardless of encoding specified should be US-ASCII (this is a more general rule of symbols but it will behave the same for class names).