Hiroyuki Komatsu
komat****@users*****
2005年 1月 13日 (木) 03:53:45 JST
Index: suikyo/ruby/src/suikyo.rb diff -u suikyo/ruby/src/suikyo.rb:1.17 suikyo/ruby/src/suikyo.rb:1.18 --- suikyo/ruby/src/suikyo.rb:1.17 Tue Jan 11 04:20:09 2005 +++ suikyo/ruby/src/suikyo.rb Thu Jan 13 03:53:44 2005 @@ -1,5 +1,5 @@ # suikyo.rb: Romaji-Hiragana conversion library for Ruby -# $Id: suikyo.rb,v 1.17 2005/01/10 19:20:09 komatsu Exp $ +# $Id: suikyo.rb,v 1.18 2005/01/12 18:53:44 komatsu Exp $ # # Copyright (C) 2002 - 2004 Hiroyuki Komatsu <komat****@taiya*****> # All rights reserved. @@ -188,9 +188,12 @@ @word[head].result = nil @word[head].cont = nil else - if @word[head].subtable.unset(rest) then - @word.delete(head) - return true + if @word[head].subtable then + @word[head].subtable.unset(rest) + if @word[head].subtable.allword.empty? then + @word.delete(head) + return true + end end end return false