From 88014d3a00de0ea7c4db31cca2d8257b06da15d5 Mon Sep 17 00:00:00 2001 From: nagai Date: Mon, 16 Jun 2008 16:54:50 +0000 Subject: * ext/tk/tcltklib.c: SEGV when exit. * ext/tk/lib/tk.rb: add a check for safety to Tk.exit. * ext/tk/sample/irbtkw.rbw: freezes when receives SIGINT. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/tk/lib') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 88e47626f..c3401dfad 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -1110,7 +1110,7 @@ module TkCore extend TkComm WITH_RUBY_VM = Object.const_defined?(:VM) && ::VM.class == Class - WITH_ENCODING = defined?(::Encoding.default_external) + WITH_ENCODING = defined?(::Encoding.default_external) && true #WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD @@ -2174,7 +2174,7 @@ module Tk end def Tk.exit - tk_call_without_enc('destroy', '.') + TkCore::INTERP.has_mainwindow? && tk_call_without_enc('destroy', '.') end ################################################ @@ -5501,7 +5501,7 @@ TkWidget = TkWindow #Tk.freeze module Tk - RELEASE_DATE = '2008-06-11'.freeze + RELEASE_DATE = '2008-06-17'.freeze autoload :AUTO_PATH, 'tk/variable' autoload :TCL_PACKAGE_PATH, 'tk/variable' -- cgit