зеркало из https://github.com/github/ruby.git
* vm_eval.c (vm_call0): fix for VM_METHOD_TYPE_NOTIMPLEMENTED.
[ruby-dev:41953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
93426cd6e8
Коммит
fd0485acf7
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 7 13:33:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_eval.c (vm_call0): fix for VM_METHOD_TYPE_NOTIMPLEMENTED.
|
||||
[ruby-dev:41953]
|
||||
|
||||
Sat Aug 7 09:47:06 2010 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c: fix checking version of GCC.
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#include <ruby.h>
|
||||
|
||||
static VALUE
|
||||
bug_funcall(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
if (argc < 1) rb_raise(rb_eArgError, "not enough argument");
|
||||
return rb_funcall2(self, rb_to_id(*argv), argc-1, argv+1);
|
||||
}
|
||||
|
||||
void
|
||||
Init_bug(void)
|
||||
{
|
||||
VALUE mBug = rb_define_module("Bug");
|
||||
rb_define_module_function(mBug, "funcall", bug_funcall, -1);
|
||||
rb_define_module_function(mBug, "notimplement", rb_f_notimplement, -1);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
create_makefile("-test-/bug-3662/bug")
|
|
@ -0,0 +1,10 @@
|
|||
require '-test-/bug-3662/bug'
|
||||
|
||||
class Test_BUG_3662 < Test::Unit::TestCase
|
||||
def test_funcall_notimplement
|
||||
bug3662 = '[ruby-dev:41953]'
|
||||
assert_raise(NotImplementedError, bug3662) {
|
||||
Bug.funcall(:notimplement)
|
||||
}
|
||||
end
|
||||
end
|
|
@ -66,6 +66,7 @@ vm_call0(rb_thread_t* th, VALUE recv, VALUE id, int argc, const VALUE *argv,
|
|||
val = vm_exec(th);
|
||||
break;
|
||||
}
|
||||
case VM_METHOD_TYPE_NOTIMPLEMENTED:
|
||||
case VM_METHOD_TYPE_CFUNC: {
|
||||
EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, id, klass);
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче