From e4879afe3e6c53871ef0b384017a25ad7eeb9d74 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sun, 30 Mar 2014 08:10:04 +0000 Subject: * parse.y (rb_str_dynamic_intern): [DOC] move rdoc from rb_str_intern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 20 ++++++++++++++++++++ string.c | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/parse.y b/parse.y index 0303387bab..3f756ce8dc 100644 --- a/parse.y +++ b/parse.y @@ -10676,6 +10676,26 @@ rb_gc_free_dsymbol(VALUE ptr) RSYMBOL(ptr)->fstr = (VALUE)NULL; } +/* + * call-seq: + * str.intern -> symbol + * str.to_sym -> symbol + * + * Returns the Symbol corresponding to str, creating the + * symbol if it did not previously exist. See Symbol#id2name. + * + * "Koala".intern #=> :Koala + * s = 'cat'.to_sym #=> :cat + * s == :cat #=> true + * s = '@cat'.to_sym #=> :@cat + * s == :@cat #=> true + * + * This can also be used to create symbols that cannot be represented using the + * :xxx notation. + * + * 'cat and dog'.to_sym #=> :"cat and dog" + */ + VALUE rb_str_dynamic_intern(VALUE str) { diff --git a/string.c b/string.c index 46cccac6e8..511374c7b8 100644 --- a/string.c +++ b/string.c @@ -7418,26 +7418,6 @@ rb_str_crypt(VALUE str, VALUE salt) } -/* - * call-seq: - * str.intern -> symbol - * str.to_sym -> symbol - * - * Returns the Symbol corresponding to str, creating the - * symbol if it did not previously exist. See Symbol#id2name. - * - * "Koala".intern #=> :Koala - * s = 'cat'.to_sym #=> :cat - * s == :cat #=> true - * s = '@cat'.to_sym #=> :@cat - * s == :@cat #=> true - * - * This can also be used to create symbols that cannot be represented using the - * :xxx notation. - * - * 'cat and dog'.to_sym #=> :"cat and dog" - */ - VALUE rb_str_intern(VALUE s) { -- cgit v1.2.3