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

nullptr is a C++11ism.

Should use numeric 0 for maximum portability.
See also https://travis-ci.org/ruby/ruby/jobs/581543798
This commit is contained in:
卜部昌平 2019-09-06 16:42:45 +09:00
parent 7516c48b27
commit 2aa4fb57d1

View file

@ -178,8 +178,9 @@ namespace test_rb_catch {
VALUE
test(VALUE self)
{
rb_catch(nullptr, RUBY_METHOD_FUNC(catcher), self); // old
return rb_catch(nullptr, catcher, self); // new
static const char *zero = 0;
rb_catch(zero, RUBY_METHOD_FUNC(catcher), self); // old
return rb_catch(zero, catcher, self); // new
}
}