summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-14 03:31:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-14 03:31:28 +0000
commit523ecd29b8acef4faa47331aaf1c6bf128b29ad6 (patch)
treedc1398668220ed51b8e352efb03713fa425de2a1 /ext
parent3dba6dabb6b5794be9f5f17277fd256ef74c6caf (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 'ext')
-rw-r--r--ext/socket/constants.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/constants.c b/ext/socket/constants.c
index bab27b2..6fc8627 100644
--- a/ext/socket/constants.c
+++ b/ext/socket/constants.c
@@ -22,7 +22,7 @@ constant_arg(VALUE arg, int (*str_to_int)(const char*, long, int*), const char *
int ret;
if (SYMBOL_P(arg)) {
- arg = rb_sym_to_s(arg);
+ arg = rb_sym2str(arg);
goto str;
}
else if (!NIL_P(tmp = rb_check_string_type(arg))) {