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

Fix can't modify frozen String error in XmlMini_JDOM #30490

Conversation

y-yagi
Copy link
Member

@y-yagi y-yagi commented Aug 31, 2017

Without this, XmlMini_JDOM raises an error as follwing:

RuntimeError: can't modify frozen String
    org/jruby/RubyString.java:2264:in `concat'
    activesupport/lib/active_support/xml_mini/jdom.rb:177:in `block in empty_content?'
    org/jruby/RubyRange.java:485:in `each'
    activesupport/lib/active_support/xml_mini/jdom.rb:174:in `empty_content?'
    activesupport/lib/active_support/xml_mini/jdom.rb:86:in `collapse'
    activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
    activesupport/lib/active_support/xml_mini/jdom.rb:84:in `block in collapse'
    org/jruby/RubyRange.java:485:in `each'
    activesupport/lib/active_support/xml_mini/jdom.rb:82:in `collapse'
    activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
    activesupport/lib/active_support/xml_mini/jdom.rb:51:in `parse'
    activesupport/lib/active_support/xml_mini.rb:101:in `parse'

We already have tests about XmlMini_JDOM. But it is not running in CI.
https://github.com/rails/rails/blob/master/activesupport/test/xml_mini/jdom_engine_test.rb

Without this, `XmlMini_JDOM` raises an error as follwing:

```
RuntimeError: can't modify frozen String
    org/jruby/RubyString.java:2264:in `concat'
    activesupport/lib/active_support/xml_mini/jdom.rb:177:in `block in empty_content?'
    org/jruby/RubyRange.java:485:in `each'
    activesupport/lib/active_support/xml_mini/jdom.rb:174:in `empty_content?'
    activesupport/lib/active_support/xml_mini/jdom.rb:86:in `collapse'
    activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
    activesupport/lib/active_support/xml_mini/jdom.rb:84:in `block in collapse'
    org/jruby/RubyRange.java:485:in `each'
    activesupport/lib/active_support/xml_mini/jdom.rb:82:in `collapse'
    activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
    activesupport/lib/active_support/xml_mini/jdom.rb:51:in `parse'
    activesupport/lib/active_support/xml_mini.rb:101:in `parse'
```

We already have tests about `XmlMini_JDOM`. But it is not running in CI.
https://github.com/rails/rails/blob/master/activesupport/test/xml_mini/jdom_engine_test.rb
@rails-bot
Copy link

r? @schneems

(@rails-bot has picked a reviewer for you, use r? to override)

@schneems
Copy link
Member

Thanks!

@schneems schneems merged commit 3c8545b into rails:master Aug 31, 2017
@schneems
Copy link
Member

Why aren't the tests running in CI?

@y-yagi y-yagi deleted the fix_cant_modify_forzen_string_error_in_XmlMini_JDOM branch August 31, 2017 22:35
@y-yagi
Copy link
Member Author

y-yagi commented Aug 31, 2017

Unfortunately, now JRuby does not pass Active Support tests. I tried it locally, but a lot of errors occurred.
Now only some components such as Action Mailer and Active Job are running on CI.

Related: #27074, #27075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants