Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When YJIT (disabled by default) is enabled in Ruby, it is displayed as follows. ```console % ruby --yjit -ve 'RubyVM::YJIT.enabled?' ruby 3.2.0dev (2022-08-18T08:09:08Z master b0b9f7201a) +YJIT [x86_64-darwin19] ``` `+YJIT` is added when YJIT is enabled. This is a change inspired by it. Below is before and after `rubocop -V`. ## Before ```console % rubocop -V 1.35.0 (using Parser 3.1.2.1, rubocop-ast 1.21.0, running on ruby 3.2.0 x86_64-darwin19) - rubocop-performance 1.14.3 - rubocop-rake 0.6.0 - rubocop-rspec 2.11.1 ``` ## After It makes the `-V` format like `ruby --version`. ### No server mode The platform (`x86_64-darwin19`) display will change slightly. ```console % rubocop -V 1.35.0 (using Parser 3.1.2.1, rubocop-ast 1.21.0, running on ruby 3.2.0) [x86_64-darwin19] - rubocop-performance 1.14.3 - rubocop-rake 0.6.0 - rubocop-rspec 2.11.1 ``` ### Server mode `+server` is added when server is enabled. ```console % rubocop -V 1.35.0 (using Parser 3.1.2.1, rubocop-ast 1.21.0, running on ruby 3.2.0) +server [x86_64-darwin19] - rubocop-performance 1.14.3 - rubocop-rake 0.6.0 - rubocop-rspec 2.11.1 ``` This change has the following benefits: - Shorthand alternative to `rubocop --server-status` - We can check the enable or disable of server mode in the bug report template
- Loading branch information