From af6e63a9df5cd21d57a7a431cf5b45234d1f1b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 17 Jun 2020 09:58:35 +0900 Subject: rb_method_name_error: delete unused code If you look at the code flow (break -> goto), this assignment never makes any sense. Should just remove. I _guess_ this behaviour is unintended. Original code at commit 4dc1a2180946ab793adee5eb235fc4ee8fa4cefe did something. It might be the code flow that is buggy. However rubyspec already includes this particular edge case at ruby/core/module/undef_method_spec.rb. I don't think we can change the way it is any longer. --- proc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/proc.c b/proc.c index 94722dd8e2..4af42c04bd 100644 --- a/proc.c +++ b/proc.c @@ -1817,7 +1817,6 @@ rb_method_name_error(VALUE klass, VALUE str) case T_MODULE: case T_CLASS: c = obj; - s = MSG(""); break; default: break; -- cgit v1.2.3