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

Frozen string failure in output #1295

Closed
viraptor opened this issue May 11, 2018 · 4 comments
Closed

Frozen string failure in output #1295

viraptor opened this issue May 11, 2018 · 4 comments

Comments

@viraptor
Copy link

Summary

A random run ended up with:

can't modify frozen String (RuntimeError)
/project/path/vendor/bundle/ruby/2.3.0/gems/cucumber-3.1.0/lib/cucumber/formatter/html.rb:571:in `snippet'
/project/path/vendor/bundle/ruby/2.3.0/gems/cucumber-3.1.0/lib/cucumber/formatter/html.rb:293:in `extra_failure_content'
...

Possible Solution

This error doesn't seem to make any sense.

  • if the string is appended there, the converter is NullConverter
  • in that case highlighted == raw_code
  • raw_code comes from snippet_for
  • snippet_for returns an array

Unless something, somewhere overrides the behaviour, this can't happen 🤔But this project doesn't override anything in related classes.

Steps to Reproduce (for bugs)

Unfortunately the ordering is random and I can't reproduce it.

Your Environment

  • Version used: 3.1.0
  • Operating System and version: Ubuntu trusty, ruby 2.3
  • Link to your project:
@xtrasimplicity
Copy link
Member

Do you have the Syntax gem installed? We patched this specific issue a little while ago, but it hasn't yet been released.
#1287

@viraptor
Copy link
Author

No, I don't have the Syntax gem

@xtrasimplicity xtrasimplicity mentioned this issue May 11, 2018
7 tasks
@xtrasimplicity
Copy link
Member

@viraptor I've created a PR with the intention of preparing a new release in the next few weeks.

In the meantime, I would recommend either temporarily monkey-patching Cucumber::Formatter::Html.snippet as per #1287 or installing the Syntax gem. Once we've released a new version of cucumber-ruby, you will be able to remove the monkey patch or uninstall the Syntax gem. :)

@lock
Copy link

lock bot commented May 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants