Skip to content

Commit

Permalink
Don't pin val passed in to rb_define_const.
Browse files Browse the repository at this point in the history
The caller should be responsible for holding a pinned reference (if they
need that)
  • Loading branch information
tenderlove committed Feb 2, 2021
1 parent c0fa4c7 commit 48fd9d6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion variable.c
Original file line number Diff line number Diff line change
Expand Up @@ -3154,7 +3154,6 @@ rb_define_const(VALUE klass, const char *name, VALUE val)
if (!rb_is_const_id(id)) {
rb_warn("rb_define_const: invalid name `%s' for constant", name);
}
rb_gc_register_mark_object(val);
rb_const_set(klass, id, val);
}

Expand Down

0 comments on commit 48fd9d6

Please sign in to comment.