diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-08 08:12:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-08 08:12:39 +0000 |
commit | 8673eacafa039f056927e0f91ce195afae9b9019 (patch) | |
tree | ad28cdccaa2ee114d3cf523de4d9f9d0167b2d50 /numeric.c | |
parent | 9c855a83f2c34ecf0e2f448d2213a6b091cdce95 (diff) |
local_variables/defined?(TOPLEVEL_CONST) in modules
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -52,6 +52,8 @@ coerce_rescue(x) VALUE *x; { TypeError("%s can't be coerced into %s", + rb_special_const_p(x[1])? + STR2CSTR(rb_inspect(x[1])): rb_class2name(CLASS_OF(x[1])), rb_class2name(CLASS_OF(x[0]))); } @@ -643,6 +645,10 @@ num2int(val) TypeError("no implicit conversion from string"); return Qnil; /* not reached */ + case T_NIL: + TypeError("no implicit conversion from nil"); + return Qnil; /* not reached */ + default: val = rb_rescue(to_integer, val, fail_to_integer, val); if (!obj_is_kind_of(val, cInteger)) { |