From 251e4060387a91737a00b3220ded24dc5117d6ca Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 30 Apr 2024 13:55:51 +0900 Subject: [PATCH] Simplify `--runtime-version` option --- bin/racc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/racc b/bin/racc index 981ccb4a..a1b3c040 100755 --- a/bin/racc +++ b/bin/racc @@ -95,14 +95,13 @@ def main exit } parser.on('--runtime-version', 'Prints runtime version and quit.') { - printf "racc runtime version %s; %s\n", + printf "racc runtime version %s; %s core version %s\n", Racc::Parser::Racc_Runtime_Version, + Racc::Parser.racc_runtime_type, if Racc::Parser.racc_runtime_type == 'ruby' - sprintf('ruby core version %s', - Racc::Parser::Racc_Runtime_Core_Version_R) + Racc::Parser::Racc_Runtime_Core_Version_R else - sprintf('c core version %s', - Racc::Parser::Racc_Runtime_Core_Version_C) + Racc::Parser::Racc_Runtime_Core_Version_C end exit }