symbols instead of IDs

* encoding.c (rb_enc_get_index): deal with symbols instead of IDs
  to get rid of inadvertent pin-downs.

* enum.c (chunk_ii): ditto.

* enumerator.c (append_method): ditto.

* iseq.c (iseq_load): ditto.

* marshal.c (w_symbol, r_symlink, r_symreal, r_symbol): ditto.

* signal.c (trap_handler): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-07-28 08:15:42 +00:00
parent e4c92f24fe
commit 95d1b61a14
6 changed files with 78 additions and 74 deletions

View file

@ -975,13 +975,15 @@ append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args)
method = rb_attr_get(obj, id_method);
if (method != Qfalse) {
ID mid = default_method;
if (!NIL_P(method)) {
Check_Type(method, T_SYMBOL);
mid = SYM2ID(method);
method = rb_sym2str(method);
}
else {
method = rb_id2str(default_method);
}
rb_str_buf_cat2(str, ":");
rb_str_buf_append(str, rb_id2str(mid));
rb_str_buf_append(str, method);
}
eargs = rb_attr_get(obj, id_arguments);