diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-31 22:50:43 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-31 22:50:43 +0000 |
commit | 023a34526bed14f11d66b1e0998de061e34e8a3b (patch) | |
tree | 9bab237a28ef0ad7b9f5b4295b43f12e45e55e85 /ext/tk/lib | |
parent | 8d33d0a5609455a334e53e1530409530a3a5ceed (diff) | |
download | ruby-023a34526bed14f11d66b1e0998de061e34e8a3b.tar.gz |
* ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
* ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit.
* ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError
for TkWindow#to_ary and to_str.
* ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments.
* ext/tk/sampel/tkballoonhelp.rb: fail to support TkEntry widgets.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r-- | ext/tk/lib/tk.rb | 12 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/plotchart.rb | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 7552abed91..f17a6af4d2 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -1174,6 +1174,8 @@ module TkCore opts = '' end + # RUN_EVENTLOOP_ON_MAIN_THREAD = true + unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!! # *** NEED TO FIX *** @@ -1275,6 +1277,14 @@ module TkCore INTERP = INTERP_THREAD[:interp] INTERP_THREAD_STATUS = INTERP_THREAD[:status] + + # delete the interpreter and kill the eventloop thread at exit + END{ + if INTERP_THREAD.alive? + INTERP.delete + INTERP_THREAD.kill + end + } end def INTERP.__getip @@ -4890,7 +4900,7 @@ class TkObject<TkKernel begin cget(name) rescue - if self.kind_of?(TkWindow) + if self.kind_of?(TkWindow) && name != "to_ary" && name != "to_str" fail NameError, "unknown option '#{id}' for #{self.inspect} (deleted widget?)" else diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb index 6b7a526b75..3c944bb266 100644 --- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb +++ b/ext/tk/lib/tkextlib/tcllib/plotchart.rb @@ -145,8 +145,8 @@ module Tk::Tcllib::Plotchart list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y)) end - def self.determine_scale(w, xmax, ymax) - tk_call_without_enc('::Plotchart::determineScale', w.path, xmax, ymax) + def self.determine_scale(*args) # (xmin, xmax, inverted=false) + tk_call_without_enc('::Plotchart::determineScale', *args) end def self.set_zoom_pan(w) |