From: Hidetoshi NAGAI Date: 2004-08-29T03:06:12+09:00 Subject: Re: tk.rb: incompatible change between 1.8.1 and 1.8.2 Hi, From: Ferenc Engard Subject: tk.rb: incompatible change between 1.8.1 and 1.8.2 Date: Sat, 28 Aug 2004 22:28:23 +0900 Message-ID: <41308872.6D98ACD9@engard.hu> > The "can't dup Fixnum" error what I have mentioned in my previous post > is caused by a change in tk.rb. (snip) > This change causes the fixnum problem in class TclTkExtIp's constructor. Sorry. This changes default Tk.appname from 'tk' to current command/script name. I didn't observe 'tcltk-ext' library on 1.8.2. As you point, it cannot work with 1.8.2. Please adopt the following patch. diff -u ../tcltk-ext051/tcltkextlib.rb ./tcltkextlib.rb --- ../tcltk-ext051/tcltkextlib.rb 2000-09-28 15:25:56.000000000 +0900 +++ ./tcltkextlib.rb 2004-08-29 02:18:01.000000000 +0900 @@ -278,7 +278,24 @@ def initialize(*libs) @libs = [] @namespace = [] - @ip = TclTkIp.new_orig + + if TclTkIp.method(:new_orig).arity != 0 + # libs ==> [ip_name, [ip_opts,]] libs + if libs.empty? || libs[0].kind_of?(Array) + ip_name = nil + ip_opts = '' + else + ip_name = libs.shift + if libs.empty? || libs[0].kind_of?(Array) + ip_opts = '' + else + ip_opts = libs.shift + end + end + @ip = TclTkIp.new_orig(ip_name, ip_opts) + else + @ip = TclTkIp.new_orig + end setup_libs(*libs) end end -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)