summaryrefslogtreecommitdiff
path: root/tool/transcode-tblgen.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 01:43:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 01:43:50 +0000
commit783541e0a4425a6b7523ba0d640f7227c932b572 (patch)
treec531342bed5a4cd0a57f84226d8d8d6b53028d23 /tool/transcode-tblgen.rb
parent747d9b3925b8c20ec42d994637fa9f8cc7f5289c (diff)
downloadbundler-783541e0a4425a6b7523ba0d640f7227c932b572.tar.gz
* 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
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rw-r--r--tool/transcode-tblgen.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 207cb5118d..3032b115ac 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -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)