diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-09-04 22:18:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 22:18:59 +0900 |
commit | eb67c603ca7e435181684857e650b4633fda5bb6 (patch) | |
tree | 2a7079315d7143010d9f561a2bb322f6378a96e9 /string.c | |
parent | d7406ccc2c99009cc2af56d5b01c411f8bb673f6 (diff) |
Added Symbol#name
https://bugs.ruby-lang.org/issues/16150#change-87446
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3514
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -11539,6 +11539,7 @@ Init_String(void) rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0); rb_define_method(rb_cSymbol, "to_s", rb_sym_to_s, 0); rb_define_method(rb_cSymbol, "id2name", rb_sym_to_s, 0); + rb_define_method(rb_cSymbol, "name", rb_sym2str, 0); rb_define_method(rb_cSymbol, "intern", sym_to_sym, 0); rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0); rb_define_method(rb_cSymbol, "to_proc", rb_sym_to_proc, 0); |