* TkMsgCatalog.callback: bug fix (wrong number of argument)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-07-18 07:26:44 +00:00
Родитель 6d27ddd289
Коммит b841a6fce5
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Sun Jul 18 16:14:29 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/msgcat.rb (TkMsgCatalog.callback): bug fix
( wrong number of argument )
Sun Jul 18 08:13:58 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Jul 18 08:13:58 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* sprintf.c (rb_f_sprintf): remove extra sign digit. * sprintf.c (rb_f_sprintf): remove extra sign digit.

Просмотреть файл

@ -50,7 +50,8 @@ class TkMsgCatalog < TkObject
} }
EOL EOL
def self.callback(namespace, locale, src_str) def self.callback(namespace, locale, src_str, *args)
src_str = sprintf(src_str, *args) unless args.empty?
cmd_tbl = TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip] cmd_tbl = TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip]
cmd = cmd_tbl[namespace] cmd = cmd_tbl[namespace]
cmd = cmd_tbl['::'] unless cmd # use global scope as interp default cmd = cmd_tbl['::'] unless cmd # use global scope as interp default