diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-03-09 22:39:12 +0900 |
---|---|---|
committer | git <[email protected]> | 2025-03-09 14:32:17 +0000 |
commit | cdf36d6bfd6409b8c626557aca7abf74b7e4e76c (patch) | |
tree | 6d1bb4ed6307f7c40fbf10af458d7049ce6272bd /lib | |
parent | 213c27825af45f25d27150a4d11164df04ee9080 (diff) |
[ruby/optparse] Allow non-string enum list #79
Command line arguments are strings, convert enum list elements to
strings to match.
https://github.com/ruby/optparse/commit/c5ec052efc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index ade98708d6..11218fe940 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1503,7 +1503,7 @@ XXX else raise ArgumentError, "argument pattern given twice" end - o.each {|pat, *v| pattern[pat] = v.fetch(0) {pat}} + o.each {|pat, *v| pattern[pat.to_s] = v.fetch(0) {pat}} when Module raise ArgumentError, "unsupported argument type: #{o}", ParseError.filter_backtrace(caller(4)) when *ArgumentStyle.keys |