summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-21 17:21:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-21 17:28:37 +0900
commit5b7cc63d114fbca641ce2d93c7b3f2117e38af60 (patch)
tree44ec0a8d6890ce5539e829a848a748cdfd709bef /load.c
parentfb85a428605265a8fd449b0702a4dd88cb6f3b20 (diff)
Turned `recur` into `int` [Feature #15777]
Diffstat (limited to 'load.c')
-rw-r--r--load.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/load.c b/load.c
index a58498555c..7661616976 100644
--- a/load.c
+++ b/load.c
@@ -1169,9 +1169,8 @@ rb_mod_autoload(VALUE mod, VALUE sym, VALUE file)
static VALUE
rb_mod_autoload_p(int argc, VALUE *argv, VALUE mod)
{
- rb_check_arity(argc, 1, 2);
+ int recur = (rb_check_arity(argc, 1, 2) == 1) ? TRUE : RTEST(argv[1]);
VALUE sym = argv[0];
- VALUE recur = (argc == 1) ? Qtrue : argv[1];
ID id = rb_check_id(&sym);
if (!id) {