ruby-changes:52675
From: naruse <ko1@a...>
Date: Sun, 30 Sep 2018 02:55:26 +0900 (JST)
Subject: [ruby-changes:52675] naruse:r64887 (trunk): no-op if it is T_STRING
naruse 2018-09-30 02:49:33 +0900 (Sun, 30 Sep 2018) New Revision: 64887 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64887 Log: no-op if it is T_STRING Modified files: trunk/re.c Index: re.c =================================================================== --- re.c (revision 64886) +++ re.c (revision 64887) @@ -3084,6 +3084,9 @@ reg_operand(VALUE s, int check) https://github.com/ruby/ruby/blob/trunk/re.c#L3084 if (SYMBOL_P(s)) { return rb_sym2str(s); } + else if (RB_TYPE_P(s, T_STRING)) { + return s; + } else { return check ? rb_str_to_str(s) : rb_check_string_type(s); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/