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

[BUG] Don't mutate passed configuration options #663

Merged
merged 2 commits into from
Jan 26, 2019

Conversation

maschwenk
Copy link
Contributor

@maschwenk maschwenk commented Sep 21, 2018

The markdown initializer mutates the options you pass it. I don't see any obvious reason why this is necessary?

Redcarpet::Markdown.new(Redcarpet::Render::HTML.new({ bizzle: 'zizzle' }.freeze), {})

RuntimeError: can't modify frozen Hash
from (pry):5:in `merge!'

Instead just merge and return a new hash 👍 👎 🤷‍♂️

@maschwenk maschwenk changed the title [BUG] Don't mutated passed options [BUG] Don't mutate passed configuration options Sep 21, 2018
@maschwenk
Copy link
Contributor Author

@robin850 Just a friendly bump on this?

@maschwenk
Copy link
Contributor Author

@robin850 another friendly 🙏 bump?

@robin850 robin850 merged commit 3100f65 into vmg:master Jan 26, 2019
robin850 added a commit that referenced this pull request Jan 26, 2019
@robin850
Copy link
Collaborator

Sorry for the late answer ; thank you very much for the patch @maschwenk ! 🎉 I took the liberty to write a more explicit test for that in the aforementioned commit and give you credit in the changelog.

@maschwenk
Copy link
Contributor Author

Haha great! I literally almost closed this yesterday because I was losing faith, glad I didn't :)

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.

2 participants