From: Matthew Kerwin Date: 2013-02-22T18:55:32+09:00 Subject: [ruby-core:52690] Re: [ruby-trunk - Feature #7795] Symbol.defined? and/or to_existing_symbol --bcaec554e1060652bf04d64d31c5 Content-Type: text/plain; charset=ISO-8859-1 On 22 February 2013 17:13, vo.x (Vit Ondruch) wrote: > Reading the documentation, it says "Returns the Symbol corresponding to > str, creating the symbol if it did not previously exist." So what would > this method did different? Or is the documentation wrong? > ---------------------------------------- > Existing method: to_sym: Returns the Symbol corresponding to str, creating the symbol if it did not previously exist. New (proposed) method: to_existing_sym: Returns the Symbol corresponding to str, raising an Exception if it did not previously exist. --bcaec554e1060652bf04d64d31c5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 2= 2 February 2013 17:13, vo.x (Vit Ondruch) <v.ondruch@tiscali.cz>= wrote:
Reading the documentation= , it says "Returns the Symbol corresponding to str, creating the symbo= l if it did not previously exist." So what would this method did diffe= rent? Or is the documentation wrong?
----------------------------------------

Existing method:
=
=A0 to_sym: Returns the Symbol corresponding to = str, creating the symbol if it did not previously exist.

New (proposed) method:
=A0 to_existing_sym: Returns the Symbol corresponding = to str, raising an Exception if it did not previously exist.
--bcaec554e1060652bf04d64d31c5--