We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My rails project, which is running with RUBYOPT="--enable-frozen-string-literal", encounter this problem. The Error message is:
RUBYOPT="--enable-frozen-string-literal"
Failure/Error: package.serialize(tempfile) FrozenError: can't modify frozen String: "" # /home/khiav/.rvm/gems/ruby-3.0.0/gems/axlsx-2.0.1/lib/axlsx/rels/relationships.rb:23:in `to_xml_string' # /home/khiav/.rvm/gems/ruby-3.0.0/gems/axlsx-2.0.1/lib/axlsx/package.rb:197:in `parts' # /home/khiav/.rvm/gems/ruby-3.0.0/gems/axlsx-2.0.1/lib/axlsx/package.rb:160:in `write_parts' # /home/khiav/.rvm/gems/ruby-3.0.0/gems/axlsx-2.0.1/lib/axlsx/package.rb:105:in `block in serialize' # /home/khiav/.rvm/gems/ruby-3.0.0/gems/rubyzip-1.0.0/lib/zip/output_stream.rb:49:in `open' # /home/khiav/.rvm/gems/ruby-3.0.0/gems/axlsx-2.0.1/lib/axlsx/package.rb:104:in `serialize'
It looks like the default arguments of to_xml_string method is a frozen string when running with the flag.
to_xml_string
axlsx/lib/axlsx/rels/relationships.rb
Line 24 in 83e2398
I suggest we replace '' with String.new, so that the empty string will never be frozen.
''
String.new
The text was updated successfully, but these errors were encountered:
Just for the record: This has already been fixed in caxlsx, see caxlsx/caxlsx@fabe8cb Not yet released though, will probably be in v4.0.0
Sorry, something went wrong.
No branches or pull requests
My rails project, which is running with
RUBYOPT="--enable-frozen-string-literal"
, encounter this problem.The Error message is:
It looks like the default arguments of
to_xml_string
method is a frozen string when running with the flag.axlsx/lib/axlsx/rels/relationships.rb
Line 24 in 83e2398
I suggest we replace
''
withString.new
, so that the empty string will never be frozen.The text was updated successfully, but these errors were encountered: