Skip to content

Swich identifiers to byte[]#4016

Draft
headius wants to merge 1 commit intoruby:mainfrom
headius:byte_ary_identifiers
Draft

Swich identifiers to byte[]#4016
headius wants to merge 1 commit intoruby:mainfrom
headius:byte_ary_identifiers

Conversation

@headius
Copy link
Contributor

@headius headius commented Mar 19, 2026

To remove the compile-time dependency on JRuby in the Java API, we need to replace RubySymbol identifiers with something implementation-independent. The simplest option is to use the original identifier bytes (byte[]).

Fixes #4009.

* JAVA_STRING_TYPE and related change to IDENTIFIER
* TruffleRuby still uses java.lang.String

Fixes ruby#4009
@headius headius force-pushed the byte_ary_identifiers branch from a1d2677 to a0aae26 Compare March 19, 2026 17:22
@kddnewton kddnewton added the java Pull requests that update Java code label Mar 19, 2026
return new String(bytes, encodingCharset).intern();
<%- else -%>
return null; // Must be implemented by subclassing Loader
return bytes; // Must be implemented by subclassing Loader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return bytes; // Must be implemented by subclassing Loader
return bytes;

@headius
Copy link
Contributor Author

headius commented Mar 19, 2026

This is still a draft and needs to be integrated into JRuby so I know if it's working properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate templated STRING_TYPE and use a factory

3 participants