ruby-changes:61744
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 17 Jun 2020 10:06:22 +0900 (JST)
Subject: [ruby-changes:61744] af6e63a9df (master): rb_method_name_error: delete unused code
https://git.ruby-lang.org/ruby.git/commit/?id=af6e63a9df 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?= <shyouhei@r...> 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. diff --git a/proc.c b/proc.c index 94722dd..4af42c0 100644 --- a/proc.c +++ b/proc.c @@ -1817,7 +1817,6 @@ rb_method_name_error(VALUE klass, VALUE str) https://github.com/ruby/ruby/blob/trunk/proc.c#L1817 case T_MODULE: case T_CLASS: c = obj; - s = MSG(""); break; default: break; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/