From: Yukihiro Matsumoto Date: 2006-03-26T00:32:17+09:00 Subject: Re: [PATCH] to_str, to_s and StringValue Hi, In message "Re: [PATCH] to_str, to_s and StringValue" on Sat, 25 Mar 2006 14:58:17 +0900, "=?ISO-8859-1?Q?Gerardo_Santana_G=F3mez_Garrido?=" writes: |I should be prepared to handle an exception if I want to use |StringValue (because it expects a would-be string, or will fail), |otherwise I should use rb_check_string_type and check by myself. If |that fails, but I strongly want a string, I should fall back to |rb_obj_as_string. | |Is that correct? I'm not sure I understand you correctly, but if you want a string, use StringValue. And if you want anything, but converted in a string, use rb_obj_as_string. I think the latter should be a rare case. matz.