>>>>> "s" == schneik  <schneik / us.ibm.com> writes:

s> In any case, I did the patch manually and it worked. In addition to trying
s> out the major widget demo, I also quickly tried out specRuby and it seems
s> to work OK too.

 I really think that you must also patch tk.rb or tkencoding.rb because
 widget begin like this :

pigeon% head -15 widget
#!/usr/local/bin/ruby
 
# widget --
# This script demonstrates the various widgets provided by Tk,
# along with many of the features of the Tk toolkit.  This file
# only contains code to generate the main window for the
# application, which invokes individual demonstrations.  The
# code for the actual demonstrations is contained in separate
# ".rb" files is this directory, which are sourced by this script
# as needed.
 
require 'tk'
require 'tkencoding'
require 'tkafter'
 
pigeon% 


 If you look at tk.rb

 ------------------------------------------------------------
if /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK
  class TclTkIp
    # from tkencoding.rb by ttate / jaist.ac.jp
    alias __eval _eval
    alias __invoke _invoke
    private :__eval
    private :__invoke
    
    attr_accessor :encoding
    
    def _eval(cmd)
      if @encoding
        _fromUTF8(__eval(_toUTF8(cmd, @encoding)), @encoding)
      else
        __eval(cmd)
      end
    end
    
    def _invoke(*cmds)
      if @encoding
        cmds = cmds.collect{|cmd| _toUTF8(cmd, @encoding)}
        _fromUTF8(__invoke(*cmds), @encoding)
      else
        __invoke(*cmds)
        end
    end
  end
 ------------------------------------------------------------
 

 then in tkencoding.rb

 ------------------------------------------------------------
# -*- ruby -*-
#
# tkencoding.rb
# written by ttate / jaist.ac.jp
 
class TclTkIp
  alias __eval _eval
  alias __invoke _invoke
  private :__eval
  private :__invoke
 
  attr_accessor :encoding
 
  def _eval(cmd)
    if( @encoding )
      _fromUTF8(__eval(_toUTF8(cmd,@encoding)),@encoding)
    else
      __eval(cmd)
    end
  end
 
  def _invoke(*cmds)
    if( @encoding )
      cmds = cmds.collect{|cmd| _toUTF8(cmd,@encoding)}
      _fromUTF8(__invoke(*cmds),@encoding)
    else
      __invoke(*cmds)
    end
  end
end
  ------------------------------------------------------------

 if the test `/^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK' is true
 then ruby will call twice `alias __eval (__invoke)' and `def _eval
 (_invoke)' and this will make an infinite loop when ruby will try to call
 `_eval' or `_invoke' after the load of tkencoding.rb


Guy Decoux