no-op if it is T_STRING
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
47a02bff24
commit
ef69efef1d
3
re.c
3
re.c
@ -3084,6 +3084,9 @@ reg_operand(VALUE s, int check)
|
|||||||
if (SYMBOL_P(s)) {
|
if (SYMBOL_P(s)) {
|
||||||
return rb_sym2str(s);
|
return rb_sym2str(s);
|
||||||
}
|
}
|
||||||
|
else if (RB_TYPE_P(s, T_STRING)) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return check ? rb_str_to_str(s) : rb_check_string_type(s);
|
return check ? rb_str_to_str(s) : rb_check_string_type(s);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user