ruby-changes:51955
From: nobu <ko1@a...>
Date: Fri, 3 Aug 2018 16:24:37 +0900 (JST)
Subject: [ruby-changes:51955] nobu:r64170 (trunk): random.c: use rb_check_funcall
nobu 2018-08-03 16:24:33 +0900 (Fri, 03 Aug 2018) New Revision: 64170 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64170 Log: random.c: use rb_check_funcall Modified files: trunk/random.c Index: random.c =================================================================== --- random.c (revision 64169) +++ random.c (revision 64170) @@ -1165,8 +1165,7 @@ range_values(VALUE vmax, VALUE *begp, VA https://github.com/ruby/ruby/blob/trunk/random.c#L1165 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/