summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/object.c b/object.c
index 548e6acf2c..1b47e974a2 100644
--- a/object.c
+++ b/object.c
@@ -1131,6 +1131,7 @@ sym_to_i(sym)
{
ID id = SYM2ID(sym);
+ rb_warning("Symbol#to_i is deprecated");
return LONG2FIX(id);
}
@@ -1141,8 +1142,10 @@ static VALUE
sym_to_int(sym)
VALUE sym;
{
+ ID id = SYM2ID(sym);
+
rb_warning("treating Symbol as an integer");
- return sym_to_i(sym);
+ return LONG2FIX(id);
}