Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable frozen_string_literal in builtin_iseq_load #4573

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

jhawthorn
Copy link
Member

@jhawthorn jhawthorn commented Jun 15, 2021

Currently this has a fairly minor effect as strings are not used heavily inside the builtins (outside of warnings, requires, and errors). Hopefully this allows us to use strings in the future where appropriate (maybe things like NilClass#to_s...).

I noticed this when looking at

$ ./ruby --disable-gems -e 'puts RubyVM::InstructionSequence.disasm(Time.instance_method(:initialize))'

which previously had

0043 putstring  "timezone argument given as positional and keyword arguments"

and on this branch has

0043 putobject  timezone argument given as positional and keyword arguments"

Currently this has a fairly minor effect as strings are not used heavily
inside the builtins (outside of warnings, requires, and errors).
Hopefully this allows us to use strings in the future where appropriate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants