summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-04 03:50:01 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-04 03:50:01 +0000
commit8acba0bc1b6db609e140339a4fdb1f2cebf45aa5 (patch)
treeb2458ebcc7d654cb1480337fb82674180b7088fa /string.c
parenta5200c59e41685b68728f8c65a64a8c436b6c9af (diff)
* string (rb_string_value): warning for implicit conversion
from Symbol to String. This behavior was introduced in r22606, merged in r22738 to ruby_1_9_1. It was an unexpected language feature change. It will be removed from Ruby in the 1.9.2. c.f. [ruby-dev:40274]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index 8a8835eca5..125599c24a 100644
--- a/string.c
+++ b/string.c
@@ -1242,6 +1242,7 @@ rb_string_value(volatile VALUE *ptr)
VALUE s = *ptr;
if (TYPE(s) != T_STRING) {
if (SYMBOL_P(s)) {
+ rb_warn("Implicit conversion from Symbol to String was introduced by mistake. This bug will be fixed in Ruby 1.9.2.");
s = rb_sym_to_s(s);
}
else {