1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix Visual Studio compilation error

See also 213964487
This commit is contained in:
卜部昌平 2019-09-06 16:33:30 +09:00
parent 04f570e266
commit 7516c48b27
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ namespace test_rb_block_call {
test(VALUE self) test(VALUE self)
{ {
const ID mid = rb_intern("each"); const ID mid = rb_intern("each");
const VALUE argv[] = {}; const VALUE argv[] = { Qundef };
rb_block_call(self, mid, 0, argv, RUBY_METHOD_FUNC(block), self); // old rb_block_call(self, mid, 0, argv, RUBY_METHOD_FUNC(block), self); // old
return rb_block_call(self, mid, 0, argv, block, self); // new return rb_block_call(self, mid, 0, argv, block, self); // new
} }

View file

@ -84,7 +84,7 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r)
/// @name Exceptions and tag jumps /// @name Exceptions and tag jumps
/// @{ /// @{
DEPRECATED_BY(::rb_block_call,) DEPRECATED_TYPE(("Use rb_block_call instead"),)
/// @brief Old way to implement iterators. /// @brief Old way to implement iterators.
/// @param[in] q A function that can yield. /// @param[in] q A function that can yield.
/// @param[in] w Passed to `q`. /// @param[in] w Passed to `q`.