diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 16:54:50 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 16:54:50 +0000 |
commit | 5ebf7049532575d8e57677a4e5bf61753c0c35e4 (patch) | |
tree | 55160f1e87398f72f93f5d378e2851aa03ef94de /ext/tk/lib/tk.rb | |
parent | 1723931102da715e5d9c8e5fbc8ab3756eaa1151 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@17368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r-- | ext/tk/lib/tk.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 88e47626f5..c3401dfadb 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' |