summaryrefslogtreecommitdiffhomepage
path: root/src/symbol.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-05-03 08:26:20 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-05-03 15:30:59 +0900
commitce054bd078168bf9a6fa41031b1bcd25a0b3f040 (patch)
tree28ffc0fd7d04a6a9dd56c335d3c070d0060a3ad7 /src/symbol.c
parent24dcd252f83e97bd1dbcb7abec9de3a77c28709b (diff)
downloadmruby-ce054bd078168bf9a6fa41031b1bcd25a0b3f040.tar.gz
mruby-ce054bd078168bf9a6fa41031b1bcd25a0b3f040.zip
symbol.c: remove `Symbol#id2sym`.
In the ancient Ruby, symbols are represented by integers. In that era, to get string representation from integers, we used `Integer#id2sym` method. Later, `Symbol` was introduced, and `id2sym` was used for compatibility. Today, no one uses `id2sym` any longer. It is described in ISO 30170:2012 standard but I consider it as a mistake.
Diffstat (limited to 'src/symbol.c')
-rw-r--r--src/symbol.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/symbol.c b/src/symbol.c
index 6e7425826..f550505d8 100644
--- a/src/symbol.c
+++ b/src/symbol.c
@@ -657,7 +657,6 @@ mrb_init_symbol(mrb_state *mrb)
MRB_SET_INSTANCE_TT(sym, MRB_TT_SYMBOL);
mrb_undef_class_method(mrb, sym, "new");
- mrb_define_method(mrb, sym, "id2name", sym_to_s, MRB_ARGS_NONE()); /* 15.2.11.3.2 */
mrb_define_method(mrb, sym, "to_s", sym_to_s, MRB_ARGS_NONE()); /* 15.2.11.3.3 */
mrb_define_method(mrb, sym, "to_sym", sym_to_sym, MRB_ARGS_NONE()); /* 15.2.11.3.4 */
mrb_define_method(mrb, sym, "inspect", sym_inspect, MRB_ARGS_NONE()); /* 15.2.11.3.5(x) */