diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-14 03:31:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-14 03:31:28 +0000 |
commit | 523ecd29b8acef4faa47331aaf1c6bf128b29ad6 (patch) | |
tree | dc1398668220ed51b8e352efb03713fa425de2a1 /re.c | |
parent | 3dba6dabb6b5794be9f5f17277fd256ef74c6caf (diff) |
use frozen string of symbols
* range.c (range_step, range_each): String#upto should never
modifies the receiver, use frozen strings to enumerate symbols.
* re.c (reg_operand): matching target is not modified.
* ext/socket/constants.c (constant_arg): str_to_int never modifies
argument strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2753,7 +2753,7 @@ static VALUE reg_operand(VALUE s, int check) { if (SYMBOL_P(s)) { - return rb_sym_to_s(s); + return rb_sym2str(s); } else { return (check ? rb_str_to_str : rb_check_string_type)(s); |