1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rb_class_modify_check: add UNREACHABLE

(I was not aware of this because I use clang, but) it seems gcc cannot
detect reachablility of this point.  It renders an unused variable
warning, which is a false positive.  Let us suppress the compiler.

https://github.com/ruby/ruby/runs/816997191#step:9:62
This commit is contained in:
卜部昌平 2020-06-29 11:43:48 +09:00
parent 1020e120e0
commit 94ab244b43

1
eval.c
View file

@ -489,6 +489,7 @@ rb_class_modify_check(VALUE klass)
break;
default:
Check_Type(klass, T_CLASS);
UNREACHABLE;
}
}
rb_frozen_error_raise(klass, "can't modify frozen %s: %"PRIsVALUE, desc, klass);