summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-15 14:52:02 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:05:41 +0900
commitb5adaa8dbdd6ce929faf9e22badbf520e9b0850b (patch)
tree7339d07700066d054a8aa58526929bdc5e87d691
parentc5f43451389a9a19d14c34e553d271038a87be99 (diff)
goruby_options: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3247
-rw-r--r--goruby.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/goruby.c b/goruby.c
index ddb62562d4..e4119c56f7 100644
--- a/goruby.c
+++ b/goruby.c
@@ -49,10 +49,8 @@ goruby_options(int argc, char **argv)
close(infd);
return ret;
}
- else {
- no_irb:
- return ruby_options(argc, argv);
- }
+ no_irb:
+ return ruby_options(argc, argv);
}
int