mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merges r28895 from trunk into ruby_1_9_2.
-- * vm_eval.c (vm_call0): fix for VM_METHOD_TYPE_NOTIMPLEMENTED. [ruby-dev:41953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c40625c6fd
commit
12ebc7f5be
5 changed files with 33 additions and 0 deletions
|
@ -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]
|
||||
|
||||
Fri Aug 6 18:59:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (realpath_rec): rb_str_modify depends on the length, so
|
||||
|
|
16
ext/-test-/bug-3662/bug.c
Normal file
16
ext/-test-/bug-3662/bug.c
Normal file
|
@ -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);
|
||||
}
|
1
ext/-test-/bug-3662/extconf.rb
Normal file
1
ext/-test-/bug-3662/extconf.rb
Normal file
|
@ -0,0 +1 @@
|
|||
create_makefile("-test-/bug-3662/bug")
|
10
test/-ext-/test_bug-3662.rb
Normal file
10
test/-ext-/test_bug-3662.rb
Normal file
|
@ -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);
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue