Skip to content

Commit

Permalink
Don't mutated passed options
Browse files Browse the repository at this point in the history
  • Loading branch information
maschwenk committed Sep 21, 2018
1 parent 92a7b3a commit 03e7997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/redcarpet/rc_markdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ static VALUE rb_redcarpet_md__new(int argc, VALUE *argv, VALUE klass)

/* Merge the current options in the @options hash */
if (hash != Qnil) {
rndr_options = rb_iv_get(rb_rndr, "@options");
rb_funcall(rndr_options, rb_intern("merge!"), 1, hash);
rndr_options = rb_funcall(rb_iv_get(rb_rndr, "@options"), rb_intern("merge"), 1, hash);
rb_iv_set(rb_rndr, "@options", rndr_options);
}

markdown = sd_markdown_new(extensions, 16, &rndr->callbacks, &rndr->options);
Expand Down

0 comments on commit 03e7997

Please sign in to comment.