diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-29 17:49:33 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-29 17:49:33 +0000 |
commit | ef69efef1da9a36d0953fdb0651faf881531781a (patch) | |
tree | a3ec4bf73e8dca867ec4be5ae570a1e86ff87f34 | |
parent | 47a02bff24c03848bf25b99b21aa04a45d4c4efd (diff) |
no-op if it is T_STRING
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | re.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3084,6 +3084,9 @@ reg_operand(VALUE s, int check) 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); } |