summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-07 06:58:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-07 06:58:31 +0000
commite11f6de3c590f5c735fa370b7ad38d1c877d1491 (patch)
tree1dfd54e1df681772bdde37454dfcfc41e0b33d0a /eval.c
parente393f0ad16f1f6646076ae9f38430422a72c800c (diff)
* ext/socket/socket.c (sock_s_unpack_sockaddr_in): remove struct
size check. getnameinfo(3) can handle. [ruby-dev:19967] * io.c (io_read): do not call rb_sys_fail() when required data length is zero. (ruby-bugs-ja PR#420) * eval.c (umethod_proc): should raise TypeError, instead of returning error causing Proc. Following the principle of "fail early". [ruby-core:00927] * pack.c (pack_pack): small but serious typo. * eval.c (backtrace): skip internal allocator frame. (ruby-bugs-ja PR#416) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index 90f91408ad..9b4420d7af 100644
--- a/eval.c
+++ b/eval.c
@@ -5087,6 +5087,9 @@ backtrace(lev)
NODE *n;
ary = rb_ary_new();
+ if (frame->last_func == ID_ALLOCATOR) {
+ frame = frame->prev;
+ }
if (lev < 0) {
ruby_set_current_source();
if (frame->last_func) {
@@ -7317,13 +7320,6 @@ bmcall(args, method)
return method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
}
-static VALUE
-umcall(args, method)
- VALUE args, method;
-{
- return method_call(0, 0, method);
-}
-
VALUE
rb_proc_new(func, val)
VALUE (*func)(ANYARGS); /* VALUE yieldarg[, VALUE procarg] */
@@ -7343,7 +7339,8 @@ static VALUE
umethod_proc(method)
VALUE method;
{
- return rb_iterate((VALUE(*)_((VALUE)))mproc, method, umcall, method);
+ rb_raise(rb_eTypeError, "unbound method cannot be executed; bind first");
+ return Qnil; /* not reached */
}
static VALUE