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
On truffleruby both of these lead to a NullPointerException:
truffleruby-1.0.0-rc2 :007 > "".force_encoding('locale')
RuntimeError: <no message> (NullPointerException)
from org.truffleruby.core.encoding.EncodingLayoutImpl.isEncoding(EncodingLayoutImpl.java:101)
from org.truffleruby.core.encoding.EncodingLayoutImpl.getEncoding(EncodingLayoutImpl.java:117)
from org.truffleruby.core.encoding.EncodingOperations.getEncoding(EncodingOperations.java:22)
from org.truffleruby.core.string.StringNodes$ForceEncodingNode.forceEncodingEncoding(StringNodes.java:1252)
from org.truffleruby.core.string.StringNodes$ForceEncodingNode.forceEncodingString(StringNodes.java:1247)
from org.truffleruby.core.string.StringNodesFactory$ForceEncodingNodeFactory$ForceEncodingNodeGen.executeAndSpecialize(StringNodesFactory.java:3456)
from org.truffleruby.core.string.StringNodesFactory$ForceEncodingNodeFactory$ForceEncodingNodeGen.execute(StringNodesFactory.java:3439)
from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:34)
from org.truffleruby.language.methods.ExceptionTranslatingNode.execute(ExceptionTranslatingNode.java:50)
from org.truffleruby.language.RubyRootNode.execute(RubyRootNode.java:50)
Translated to internal error
from (irb):7:in `force_encoding'
from (irb):7:in `<top (required)>'
The text was updated successfully, but these errors were encountered:
medlefsen
changed the title
locale and filesystem encodings throw NullPointerException
force_encoding locale and filesystem encodings throw NullPointerException
Jul 24, 2018
Thanks for the helpful bug report! I'm a bit embarrassed this was an issue at all, but it's been fixed in f7a7a09. I've also added some specs for the Ruby Spec Suite to help ensure this doesn't regress and so other implementations can benefit from the extra tests.
The fix will appear in the next release (expected to be 1.0.0 RC5).
Thanks for the kind words. In case you hadn't seen, 1.0.0 RC5 has been released. If you get a chance, I'd love to verify that this issue has truly been fixed for you.
On Sat, Aug 4, 2018 at 4:12 PM Kevin Menard ***@***.***> wrote:
Thanks for the kind words. In case you hadn't seen, 1.0.0 RC5 has been
released. If you get a chance, I'd love to verify that this issue has truly
been fixed for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1397 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJYLCzFg6ni7Di0VjFSK-UQsssqZtBjks5uNgAugaJpZM4VcjDi>
.
Installed truffleruby via rvm (1.0.0-rc2).
In MRI Encoding::force_encoding supports 'locale' and 'filesystem' as bulit-in aliases for system locales.
https://ruby-doc.org/core-2.4.0/Encoding.html#class-Encoding-label-Locale+encoding
On truffleruby both of these lead to a NullPointerException:
The text was updated successfully, but these errors were encountered: