diff options
author | st0012 <stan001212@gmail.com> | 2022-06-28 14:39:56 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-07-16 02:30:23 +0900 |
commit | 36ca0e58b600f3338ad4880d77c8c7fbc8f51460 (patch) | |
tree | 31bc41b1c4b4526f10c72cec587d5e66a6d945da /test/benchmark | |
parent | 280b805d040fa537d5a459b40d4bfa6d49700905 (diff) | |
download | ruby-36ca0e58b600f3338ad4880d77c8c7fbc8f51460.tar.gz |
[ruby/reline] Use color name instead of code (integer) in dialog color APIs
As pointed out in the
[comment](https://github.com/ruby/reline/pull/413#issuecomment-1168033973),
the code is actually a control sequence and not only for colors.
To make the dialog color APIs safer to use, we should restrict its
usages and extract away the bg/fg concept from the input.
So in this commit, I made these changes:
1. The dialog_*_bg/fg_color APIs only takes and returns color names (symbol):
- :black
- :red
- :green
- :yellow
- :blue
- :magenta
- :cyan
- :white
2. Add additional dialog_*_bg/fg_color_sequence APIs to access the raw code.
https://github.com/ruby/reline/commit/b32a977766
Diffstat (limited to 'test/benchmark')
0 files changed, 0 insertions, 0 deletions