From: "naruse (Yui NARUSE)" Date: 2012-07-09T15:31:21+09:00 Subject: [ruby-core:46261] [ruby-trunk - Feature #6697][Feedback] [PATCH] Add Kernel#Symbol conversion method like String(), Array() etc. Issue #6697 has been updated by naruse (Yui NARUSE). Status changed from Open to Feedback String(obj) calls obj.to_str first, then calls obj.to_s. So they are different. Integer("foo") raises ArgumentError, but "foo".to_i returns 0. Array("foo") returns ["foo"], but "foo".to_a raises NoMethodError on 1.9. Hash(nil) returns {}, but nil.to_hash raises NoMethodError. So your point about consistency is not reasonable. ---------------------------------------- Feature #6697: [PATCH] Add Kernel#Symbol conversion method like String(), Array() etc. https://bugs.ruby-lang.org/issues/6697#change-27884 Author: madeofcode (Mark Dodwell) Status: Feedback 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/