ruby-changes:11656
From: naruse <ko1@a...>
Date: Sun, 26 Apr 2009 22:25:24 +0900 (JST)
Subject: [ruby-changes:11656] Ruby:r23295 (trunk): * tool/transcode-tb (ActionMap#each_firstbyte):
naruse 2009-04-26 22:25:09 +0900 (Sun, 26 Apr 2009) New Revision: 23295 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23295 Log: * tool/transcode-tb (ActionMap#each_firstbyte): if :asis collides other mappings, use another. * tool/transcode-tb (ActionMap#generate_info): add :asis for ASIS. Modified files: trunk/ChangeLog trunk/tool/transcode-tblgen.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 23294) +++ ChangeLog (revision 23295) @@ -1,3 +1,11 @@ +Sun Apr 26 22:17:02 2009 NARUSE, Yui <naruse@r...> + + * tool/transcode-tb (ActionMap#each_firstbyte): + if :asis collides other mappings, use another. + + * tool/transcode-tb (ActionMap#generate_info): + add :asis for ASIS. + Sun Apr 26 21:59:43 2009 NARUSE, Yui <naruse@r...> * transcode.c (ASIS): added for multi byte direct map. Index: tool/transcode-tblgen.rb =================================================================== --- tool/transcode-tblgen.rb (revision 23294) +++ tool/transcode-tblgen.rb (revision 23295) @@ -237,7 +237,10 @@ else ss.each_firstbyte {|byte, rest| h[byte] ||= {} - if h[byte][rest] + if h[byte][rest].nil? + elsif action == :asis + next + elsif h[byte][rest] != :asis raise "ambiguous %s or %s (%02X/%s)" % [h[byte][rest], action, byte, rest] end h[byte][rest] = action @@ -316,6 +319,8 @@ case info when :nomap "NOMAP" + when :asis + "ASIS" when :undef "UNDEF" when :invalid -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/