aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-30 12:47:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-30 12:47:58 +0000
commit47f07756e529b84a25eda71e9397d43d0b6570b6 (patch)
tree2a6d392b23f4c214b77ab9dfc4d26d41c00148f3 /enum.c
parentf60ff8c02c9f33d7249976ba80e03b65ad10de34 (diff)
downloadruby-47f07756e529b84a25eda71e9397d43d0b6570b6.tar.gz
enum.c: rb_check_funcall_default for fallback value
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index 23cfddd96d..5c973e643d 100644
--- a/enum.c
+++ b/enum.c
@@ -361,9 +361,7 @@ find_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
static VALUE
enum_size(VALUE self, VALUE args, VALUE eobj)
{
- VALUE r;
- r = rb_check_funcall(self, id_size, 0, 0);
- return (r == Qundef) ? Qnil : r;
+ return rb_check_funcall_default(self, id_size, 0, 0, Qnil);
}
static long