summaryrefslogtreecommitdiff
path: root/rational.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 /rational.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 'rational.c')
-rw-r--r--rational.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rational.c b/rational.c
index 47e67f1..b320ed5 100644
--- a/rational.c
+++ b/rational.c
@@ -2121,7 +2121,7 @@ nilclass_to_r(VALUE self)
static VALUE
nilclass_rationalize(int argc, VALUE *argv, VALUE self)
{
- rb_scan_args(argc, argv, "01", NULL);
+ rb_check_arity(argc, 0, 1);
return nilclass_to_r(self);
}
@@ -2150,7 +2150,7 @@ integer_to_r(VALUE self)
static VALUE
integer_rationalize(int argc, VALUE *argv, VALUE self)
{
- rb_scan_args(argc, argv, "01", NULL);
+ rb_check_arity(argc, 0, 1);
return integer_to_r(self);
}