Skip to content

Commit 03e7997

Browse files
committed
Don't mutated passed options
1 parent 92a7b3a commit 03e7997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/redcarpet/rc_markdown.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ static VALUE rb_redcarpet_md__new(int argc, VALUE *argv, VALUE klass)
115115

116116
/* Merge the current options in the @options hash */
117117
if (hash != Qnil) {
118-
rndr_options = rb_iv_get(rb_rndr, "@options");
119-
rb_funcall(rndr_options, rb_intern("merge!"), 1, hash);
118+
rndr_options = rb_funcall(rb_iv_get(rb_rndr, "@options"), rb_intern("merge"), 1, hash);
119+
rb_iv_set(rb_rndr, "@options", rndr_options);
120120
}
121121

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

0 commit comments

Comments
 (0)