diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 15:38:49 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-17 15:38:49 +0000 |
commit | e4fd9de96df71fc3a808badb8e1f96f33a27bcca (patch) | |
tree | 076d9074d44ff5a1d3856bfc2b3bdb0ef129665a | |
parent | 1ef4fecd63db680dd9b417791de9522944ebde61 (diff) |
merge revision(s) 41347: [Backport #5048] [Backport #5465] [Backport #8319]
* ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [ruby-trunk - Bug #5465]
* ext/tk/extconf.rb: apply [Backport87 - Backport #5048]
* ext/tk/lib/tk/canvas.rb, ext/tk/sample/demos-{en,jp}/{tree.rb,widget}: fix bug (Thanks to zzak) [ruby-trunk - Bug #8319]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ext/tk/extconf.rb | 4 | ||||
-rw-r--r-- | ext/tk/lib/tk/canvas.rb | 9 | ||||
-rw-r--r-- | ext/tk/sample/demos-en/tree.rb | 2 | ||||
-rw-r--r-- | ext/tk/sample/demos-en/widget | 6 | ||||
-rw-r--r-- | ext/tk/sample/demos-jp/tree.rb | 2 | ||||
-rw-r--r-- | ext/tk/sample/demos-jp/widget | 6 | ||||
-rw-r--r-- | version.h | 6 |
8 files changed, 32 insertions, 14 deletions
@@ -1,3 +1,14 @@ +Tue Jun 18 00:34:57 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org> + +merge revision(s) 41347: [Backport #5048] [Backport #5465] [Backport #8319] + + * ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [Bug #5465] + + * ext/tk/extconf.rb: apply [Bug #5048] + + * ext/tk/lib/tk/canvas.rb,ext/tk/sample/demos-{en,jp}/{tree.rb,widget}: + fix bug (Thanks to zzak) [ruby-trunk - Bug #8319] + Sun Jun 16 01:56:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (FL_SET_EMBED): shared object is frozen even when get diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb index 8f3bff8531..46e9fc082d 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -114,7 +114,7 @@ def is_macosx? end def maybe_64bit? - /64|universal/ =~ RUBY_PLATFORM + /64|universal|s390x/ =~ RUBY_PLATFORM end def check_tcltk_version(version) @@ -313,7 +313,9 @@ def find_macosx_framework paths.reverse! unless TkLib_Config["ActiveTcl"] # system has higher priority paths.map{|dir| dir.strip.chomp('/')}.each{|dir| + next unless File.exist?(File.join(dir, "Tcl.framework", "Headers")) next unless File.directory?(tcldir = File.join(dir, "Tcl.framework")) + next unless File.exist?(File.join(dir, "Tk.framework"), "Headers") next unless File.directory?(tkdir = File.join(dir, "Tk.framework")) TkLib_Config["tcltk-framework"] = dir return [tcldir, tkdir] diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb index 7d3d71675c..af404213e7 100644 --- a/ext/tk/lib/tk/canvas.rb +++ b/ext/tk/lib/tk/canvas.rb @@ -85,11 +85,16 @@ class Tk::Canvas<TkWindow # create a canvas item without creating a TkcItem object def create(type, *args) - type = TkcItem.type2class(type.to_s) unless type.kind_of?(TkcItem) + if type.kind_of?(Class) && type < TkcItem + # do nothing + elsif TkcItem.type2class(type.to_s) + type = TkcItem.type2class(type.to_s) + else + fail ArgumentError, "type must a subclass of TkcItem class, or a string in CItemTypeToClass" + end type.create(self, *args) end - def addtag(tag, mode, *args) mode = mode.to_s if args[0] && mode =~ /^(above|below|with(tag)?)$/ diff --git a/ext/tk/sample/demos-en/tree.rb b/ext/tk/sample/demos-en/tree.rb index cd62ba8c9b..69154ee076 100644 --- a/ext/tk/sample/demos-en/tree.rb +++ b/ext/tk/sample/demos-en/tree.rb @@ -67,7 +67,7 @@ def populate_tree(tree, node) path = tree.get(node, :fullpath) tree.delete(tree.children(node)) Dir.glob("#{path}/*").sort.each{|f| - type = File.ftype(f) + type = File.ftype(f) rescue nil id = tree.insert(node, :end, :text=>File.basename(f), :values=>[f, type]).id if type == 'directory' diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget index 21dd41685f..fb49a746b9 100644 --- a/ext/tk/sample/demos-en/widget +++ b/ext/tk/sample/demos-en/widget @@ -683,7 +683,7 @@ def eval_samplecode(code, file=nil) end } } - Tk.update + Tk.update rescue nil end # invoke -- @@ -699,7 +699,7 @@ def invoke(txt, idx) cursor = txt.cget('cursor') txt.cursor('watch') - Tk.update + Tk.update rescue nil # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding) # Tk.update eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb') @@ -1058,7 +1058,7 @@ if ARGV[0] == '-n' no_launcher = true if ARGV.size > 0 else # show the root widget to make it lower then demo windows - Tk.update + Tk.update rescue nil end ARGV.each{|cmd| if cmd =~ /(.*).rb/ diff --git a/ext/tk/sample/demos-jp/tree.rb b/ext/tk/sample/demos-jp/tree.rb index 1c779391d4..3f3b18b677 100644 --- a/ext/tk/sample/demos-jp/tree.rb +++ b/ext/tk/sample/demos-jp/tree.rb @@ -68,7 +68,7 @@ def populate_tree(tree, node) path = tree.get(node, :fullpath) tree.delete(tree.children(node)) Dir.glob("#{path}/*").sort.each{|f| - type = File.ftype(f) + type = File.ftype(f) rescue nil id = tree.insert(node, :end, :text=>File.basename(f), :values=>[f, type]).id if type == 'directory' diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget index 193c15affd..5f5dfb9d70 100644 --- a/ext/tk/sample/demos-jp/widget +++ b/ext/tk/sample/demos-jp/widget @@ -740,7 +740,7 @@ def eval_samplecode(code, file=nil) end } } - Tk.update + Tk.update rescue nil end # テキスト上での click に対する動作 @@ -750,7 +750,7 @@ def invoke(txt, idx) cursor = txt.cget('cursor') txt.cursor('watch') - Tk.update + Tk.update rescue nil # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding) # Tk.update eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb') @@ -1094,7 +1094,7 @@ if ARGV[0] == '-n' no_launcher = true if ARGV.size > 0 else # show the root widget to make it lower then demo windows - Tk.update + Tk.update rescue nil end ARGV.each{|cmd| if cmd =~ /(.*).rb/ @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.0.0" -#define RUBY_RELEASE_DATE "2013-06-16" -#define RUBY_PATCHLEVEL 222 +#define RUBY_RELEASE_DATE "2013-06-18" +#define RUBY_PATCHLEVEL 223 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 16 +#define RUBY_RELEASE_DAY 18 #include "ruby/version.h" |