summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-14 07:10:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-14 07:10:31 +0000
commit46620a87720943120cabe6ffe2e94a2c3506c4c2 (patch)
tree472565a24cc842b64c3b97f573688154a1ac75bb /object.c
parente9cf3b3bf56646e94df9189bfe8d6449b79ca0fb (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/object.c b/object.c
index 9b5d50a..c4283cb 100644
--- a/object.c
+++ b/object.c
@@ -885,8 +885,8 @@ rb_to_integer(val, method)
val = rb_rescue2(to_type, (VALUE)&arg1, fail_to_type, (VALUE)&arg2,
rb_eStandardError, rb_eNameError, 0);
if (!rb_obj_is_kind_of(val, rb_cInteger)) {
- rb_raise(rb_eTypeError, "%s#%s_i should return Integer",
- method, rb_class2name(CLASS_OF(arg1.val)));
+ rb_raise(rb_eTypeError, "%s#%s should return Integer",
+ rb_class2name(CLASS_OF(arg1.val)), method);
}
return val;
}
@@ -1166,6 +1166,7 @@ Init_Object()
rb_undef_method(CLASS_OF(rb_cSymbol), "new");
rb_define_method(rb_cSymbol, "type", sym_type, 0);
rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
+ rb_define_method(rb_cSymbol, "to_int", sym_to_i, 0);
rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);