summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-04 02:24:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-04 02:24:15 +0000
commit4b85e88174eea7a79d9c68210d716dc3e4c4f0eb (patch)
treeef0e8d1db1b3072c40ee0d3c68859fd7511b1e53 /complex.c
parentb0ec083a20c7b717492994f1ad7a03a97540f218 (diff)
Prefer rb_check_arity when 0 or 1 arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index 7a52a4259e..dcc25852a9 100644
--- a/complex.c
+++ b/complex.c
@@ -1491,7 +1491,7 @@ nucomp_rationalize(int argc, VALUE *argv, VALUE self)
{
get_dat1(self);
- rb_scan_args(argc, argv, "01", NULL);
+ rb_check_arity(argc, 0, 1);
if (!k_exact_zero_p(dat->imag)) {
rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Rational",