-
Notifications
You must be signed in to change notification settings - Fork 71
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 literals #172
Enable frozen string literals #172
Conversation
@@ -60,20 +62,20 @@ | |||
context 'IO object' do | |||
let(:answer) { 'read' } | |||
let(:rio) { StringIO.new(answer, 'r') } | |||
let(:wio) { StringIO.new('write', 'w') } | |||
let(:wio) { StringIO.new(+'write', 'w') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the only noticeable change in this PR. I've searched for potential issues like << "
or = ''
but I couldn't find them
e091800
to
fb92137
Compare
96d62fc
to
b25a180
Compare
Hi @jamesmartin, sorry for the ping if you can take a look at
Then we can go for this one. I'm also working on profiling and benchmarks |
@tagliala thanks for the ping. I've reviewed, approved and merged the three PRs on which this branch depends. Feel free to push this one forward whenever you have time. 👍 |
Additionally, tested locally with ``` RUBYOPT="--enable-frozen-string-literal --debug-frozen-string-literal" bundle exec rspec ```
d422422
to
792e372
Compare
@jamesmartin thanks, pushed I cannot guarante 100% that there isn't an edge case which breaks with frozen string literals, but at the moment I didn't find one. Here there are some comparisons on memory side. I don't know if this makes a difference when a page contains a single Benchdef run_benchmark_sample(iterations: 1)
# Plain
HELPER.inline_svg_tag 'example.svg'
# Class
HELPER.inline_svg_tag 'example.svg', class: 'test-class'
# Id
HELPER.inline_svg_tag 'example.svg', id: 'test-id'
# Aria
HELPER.inline_svg_tag 'example.svg', title: 'Title', desc: 'Description', aria: true
# Style
HELPER.inline_svg_tag 'example.svg', style: 'margin: 0;'
# ...
HELPER.inline_svg_tag 'example.svg', class: 'test-class',
id: 'test-id',
style: 'margin: 0;',
title: 'Title', desc: 'Description', aria: true
# Different SVG
HELPER.inline_svg_tag 'static_assets/assets0/some-document.svg', class: 'test-class'
end MemoryBefore
After
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tagliala thanks for the PR and for the benchmarks. ✨
I cannot guarante 100% that there isn't an edge case which breaks with frozen string literals, but at the moment I didn't find one.
Let's trust the test suite and move forward from here. 👍
This change qualifies for an entry in the changelog. Additionally, removes some double whitespaces Ref: jamesmartin#172
This change qualifies for an entry in the changelog. Additionally, removes some double whitespaces Ref: jamesmartin#172
This change qualifies for an entry in the changelog. Ref: jamesmartin#172
This change qualifies for an entry in the changelog. Additionally: - Fix some double spaces - Fix link to 1.10.0 release Ref: jamesmartin#172
Blocked by:
File::NULL
instead of hardcoded/dev/null
#174