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

Attempt to modify frozen string litterals #254

Closed
MadBomber opened this issue Sep 5, 2020 · 2 comments
Closed

Attempt to modify frozen string litterals #254

MadBomber opened this issue Sep 5, 2020 · 2 comments

Comments

@MadBomber
Copy link
Contributor

I just ran into a problem in the to_s method of Slop::Options. The lines where where << is used on the local variable 'str' are raising the error ...

/Users/dewayne/.rvm/gems/ruby-2.7.1/gems/slop-4.8.2/lib/slop/options.rb:108:in `block in to_s': can't modify frozen String: "Install stuff from the directory common_debug into the current project\n" (FrozenError)

Looks like replacing the "str <<" with "str +=" fixes it. I will work up a PR.

@MadBomber
Copy link
Contributor Author

I forked the repo; cloned it to my workstation and ran rake test. Got about 5 failures; I created a new branch with a PR to replace the "str <<" with "str +=" in the to_s method in the options class.

After this fix the rake test produced zero errors.

The PR is #255

@leejarvis
Copy link
Owner

Moving discussion to that PR

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

No branches or pull requests

2 participants