mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/transcode-tblgen.rb (StrSet.parse): accept upper case
hexadecimal digits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dc98e2528a
commit
fb9c53dea5
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Sep 6 06:23:27 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* tool/transcode-tblgen.rb (StrSet.parse): accept upper case
|
||||||
|
hexadecimal digits.
|
||||||
|
|
||||||
Sat Sep 6 05:37:08 2008 Tanaka Akira <akr@fsij.org>
|
Sat Sep 6 05:37:08 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (output_hex_charref): upcase hexadecimal digits.
|
* transcode.c (output_hex_charref): upcase hexadecimal digits.
|
||||||
|
|
|
@ -36,11 +36,11 @@ class StrSet
|
||||||
seq = $'
|
seq = $'
|
||||||
set_result = []
|
set_result = []
|
||||||
set.scan(/[^,]+/) {|range|
|
set.scan(/[^,]+/) {|range|
|
||||||
if /\A([0-9a-f][0-9a-f])-([0-9a-f][0-9a-f])\z/ =~ range
|
if /\A([0-9a-f][0-9a-f])-([0-9a-f][0-9a-f])\z/i =~ range
|
||||||
b = $1.to_i(16)
|
b = $1.to_i(16)
|
||||||
e = $2.to_i(16)
|
e = $2.to_i(16)
|
||||||
set_result << (b..e)
|
set_result << (b..e)
|
||||||
elsif /\A([0-9a-f][0-9a-f])\z/ =~ range
|
elsif /\A([0-9a-f][0-9a-f])\z/i =~ range
|
||||||
byte = $1.to_i(16)
|
byte = $1.to_i(16)
|
||||||
set_result << (byte..byte)
|
set_result << (byte..byte)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue