Issue #6697 has been updated by madeofcode (Mark Dodwell).


You could make the same argument against String. Why would you use that over `#to_s`? I can't think of any use cases for that :)

To me, it's really about API consistency. I don't believe you would actually use it frequently, but including it is following the principle of least surprise.

Fwiw. I discovered Symbol did not exist by writing some code to call it, expecting it (since there is String, Array, Hash, etc.) I doubt I'm the only one who's tried calling Symbol, expecting it to exist.
----------------------------------------
Feature #6697: [PATCH] Add Kernel#Symbol conversion method like String(), Array() etc.
https://bugs.ruby-lang.org/issues/6697#change-27863

Author: madeofcode (Mark Dodwell)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 2.0.0


For consistency, it seems to make sense to add a Kernel#Symbol helper.

This change would not break any existing code and it provides a more consistent interface.

Thoughts?


-- 
http://bugs.ruby-lang.org/