summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-18 07:26:44 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-18 07:26:44 +0000
commitb841a6fce553dd5440a86c7ad9dcabfe7c06f826 (patch)
tree5fb4d5b6590919771d28cf855b579bbc74793183
parent6d27ddd2895562b6a951851cd1d89d3bfd15e0e1 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--ext/tk/lib/tk/msgcat.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b1bf18997a..2321e0adeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* sprintf.c (rb_f_sprintf): remove extra sign digit.
diff --git a/ext/tk/lib/tk/msgcat.rb b/ext/tk/lib/tk/msgcat.rb
index 361b9a5de3..34f828f768 100644
--- a/ext/tk/lib/tk/msgcat.rb
+++ b/ext/tk/lib/tk/msgcat.rb
@@ -50,7 +50,8 @@ class TkMsgCatalog < TkObject
}
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 = cmd_tbl[namespace]
cmd = cmd_tbl['::'] unless cmd # use global scope as interp default