1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/transcode-tblgen.rb (citrus_decode_mapsrc): support older 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-09-04 01:43:50 +00:00
parent 747d9b3925
commit 783541e0a4
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Thu Sep 4 10:43:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* tool/transcode-tblgen.rb (citrus_decode_mapsrc): support older 1.8.
Thu Sep 4 10:33:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (argf_next_argv, argf_set_encoding): copy struct wise.

View file

@ -486,13 +486,13 @@ def citrus_decode_mapsrc(ces, csid, mapsrcs)
mapsrcs.split(',').each do |mapsrc|
path = [$srcdir]
mode = nil
if mapsrc.start_with?('UCS')
if mapsrc.rindex('UCS', 0)
mode = :from_ucs
from = mapsrc[4..-1]
path << SUBDIR.find{|x| from.start_with?(x) }
path << SUBDIR.find{|x| from.rindex(x, 0) }
else
mode = :to_ucs
path << SUBDIR.find{|x| mapsrc.start_with?(x) }
path << SUBDIR.find{|x| mapsrc.rindex(x, 0) }
end
path << mapsrc.gsub(':', '@')
path = File.join(*path)