diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-03 07:24:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-03 07:24:33 +0000 |
commit | 1f71ea2fd23e640efb3300ba9a9432ff99801a15 (patch) | |
tree | 8bddddf973e94b6abbe5b40a93ebf8f41e4991e9 | |
parent | 4b4d364e5228a42eef3f086c01a7067680fd1f6a (diff) | |
download | ruby-1f71ea2fd23e640efb3300ba9a9432ff99801a15.tar.gz |
random.c: use rb_check_funcall
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | random.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1165,8 +1165,7 @@ range_values(VALUE vmax, VALUE *begp, VALUE *endp, int *exclp) if (!rb_range_values(vmax, begp, &end, exclp)) return Qfalse; if (endp) *endp = end; if (NIL_P(end)) return Qnil; - if (!rb_respond_to(end, id_minus)) return Qfalse; - r = rb_funcallv(end, id_minus, 1, begp); + r = rb_check_funcall(end, id_minus, 1, begp); if (NIL_P(r)) return Qfalse; return r; } |