summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-09 04:01:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-09 04:01:07 +0000
commitdce00119c6173eb2557df64d365bd858ccf3c7ba (patch)
tree025256cb03206aaa71ac7293a4a34095606debab /vm.c
parent301143273a9b0cab08ff78d788674426281c324c (diff)
special exception messages are static
* vm_core.h (rb_vm_register_special_exception): make the contents of special exception messages static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 6182240526..869d097d7c 100644
--- a/vm.c
+++ b/vm.c
@@ -2130,11 +2130,12 @@ rb_vm_mark(void *ptr)
RUBY_MARK_LEAVE("vm");
}
+#undef rb_vm_register_special_exception
void
-rb_vm_register_special_exception(enum ruby_special_exceptions sp, VALUE cls, const char *mesg)
+rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE cls, VALUE mesg)
{
rb_vm_t *vm = GET_VM();
- VALUE exc = rb_exc_new3(cls, rb_obj_freeze(rb_str_new2(mesg)));
+ VALUE exc = rb_exc_new3(cls, rb_obj_freeze(mesg));
OBJ_TAINT(exc);
OBJ_FREEZE(exc);
((VALUE *)vm->special_exceptions)[sp] = exc;