Ruby
1.9.3p392(2013-02-22revision39386)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
-test-
funcall
passing_block.c
Go to the documentation of this file.
1
#include "ruby.h"
2
3
VALUE
rb_funcall_passing_block
(
VALUE
,
ID
,
int
,
const
VALUE
*);
4
5
static
VALUE
6
with_funcall2
(
int
argc
,
VALUE
*
argv
,
VALUE
self
)
7
{
8
return
rb_funcall2
(
self
,
rb_intern
(
"target"
), argc, argv);
9
}
10
11
static
VALUE
12
with_funcall_passing_block
(
int
argc
,
VALUE
*
argv
,
VALUE
self
)
13
{
14
return
rb_funcall_passing_block
(
self
,
rb_intern
(
"target"
), argc, argv);
15
}
16
17
void
18
Init_funcall
(
void
)
19
{
20
VALUE
cRelay =
rb_path2class
(
"TestFuncall::Relay"
);
21
22
rb_define_singleton_method
(cRelay,
23
"with_funcall2"
,
24
with_funcall2
,
25
-1);
26
rb_define_singleton_method
(cRelay,
27
"with_funcall_passing_block"
,
28
with_funcall_passing_block
,
29
-1);
30
}
31
Generated on Tue Feb 26 2013 08:42:53 for Ruby by
1.8.3