|
61 | 61 | #include "ruby/util.h"
|
62 | 62 | #include "ruby/version.h"
|
63 | 63 | #include "ruby/internal/error.h"
|
64 |
| -#include "version.h" |
65 | 64 |
|
66 | 65 | #define singlebit_only_p(x) !((x) & ((x)-1))
|
67 | 66 | STATIC_ASSERT(Qnil_1bit_from_Qfalse, singlebit_only_p(Qnil^Qfalse));
|
@@ -302,6 +301,8 @@ ruby_show_usage_line(const char *name, const char *secondary, const char *descri
|
302 | 301 | description, help, highlight, width, columns);
|
303 | 302 | }
|
304 | 303 |
|
| 304 | +RUBY_EXTERN const char ruby_api_version_name[]; |
| 305 | + |
305 | 306 | static void
|
306 | 307 | usage(const char *name, int help, int highlight, int columns)
|
307 | 308 | {
|
@@ -404,9 +405,9 @@ usage(const char *name, int help, int highlight, int columns)
|
404 | 405 | unsigned int w = (columns > 80 ? (columns - 79) / 2 : 0) + 16;
|
405 | 406 | #define SHOW(m) show_usage_line(&(m), help, highlight, w, columns)
|
406 | 407 |
|
407 |
| - printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n\n", sb, se, name); |
408 |
| - printf("Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", |
409 |
| - RUBY_PATCHLEVEL == -1 ? "master" : STRINGIZE(RUBY_VERSION_MAJOR) "." STRINGIZE(RUBY_VERSION_MINOR)); |
| 408 | + printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n", sb, se, name); |
| 409 | + printf("\n""Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", |
| 410 | + ruby_api_version_name); |
410 | 411 |
|
411 | 412 | for (i = 0; i < num; ++i)
|
412 | 413 | SHOW(usage_msg[i]);
|
|
0 commit comments