Skip to content

Commit e4fd9de

Browse files
committed
merge revision(s) 41347: [Backport ruby#5048] [Backport ruby#5465] [Backport ruby#8319]
* ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [ruby-trunk - Bug ruby#5465] * ext/tk/extconf.rb: apply [Backport87 - Backport ruby#5048] * ext/tk/lib/tk/canvas.rb, ext/tk/sample/demos-{en,jp}/{tree.rb,widget}: fix bug (Thanks to zzak) [ruby-trunk - Bug ruby#8319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 1ef4fec commit e4fd9de

File tree

8 files changed

+32
-14
lines changed

8 files changed

+32
-14
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Tue Jun 18 00:34:57 2013 CHIKANAGA Tomoyuki <[email protected]>
2+
3+
merge revision(s) 41347: [Backport #5048] [Backport #5465] [Backport #8319]
4+
5+
* ext/tk/extconf.rb: support s390x (Thanks to bkabrda) [Bug #5465]
6+
7+
* ext/tk/extconf.rb: apply [Bug #5048]
8+
9+
* ext/tk/lib/tk/canvas.rb,ext/tk/sample/demos-{en,jp}/{tree.rb,widget}:
10+
fix bug (Thanks to zzak) [ruby-trunk - Bug #8319]
11+
112
Sun Jun 16 01:56:54 2013 Nobuyoshi Nakada <[email protected]>
213

314
* array.c (FL_SET_EMBED): shared object is frozen even when get

ext/tk/extconf.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def is_macosx?
114114
end
115115

116116
def maybe_64bit?
117-
/64|universal/ =~ RUBY_PLATFORM
117+
/64|universal|s390x/ =~ RUBY_PLATFORM
118118
end
119119

120120
def check_tcltk_version(version)
@@ -313,7 +313,9 @@ def find_macosx_framework
313313
paths.reverse! unless TkLib_Config["ActiveTcl"] # system has higher priority
314314

315315
paths.map{|dir| dir.strip.chomp('/')}.each{|dir|
316+
next unless File.exist?(File.join(dir, "Tcl.framework", "Headers"))
316317
next unless File.directory?(tcldir = File.join(dir, "Tcl.framework"))
318+
next unless File.exist?(File.join(dir, "Tk.framework"), "Headers")
317319
next unless File.directory?(tkdir = File.join(dir, "Tk.framework"))
318320
TkLib_Config["tcltk-framework"] = dir
319321
return [tcldir, tkdir]

ext/tk/lib/tk/canvas.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,16 @@ def tagid(tag)
8585

8686
# create a canvas item without creating a TkcItem object
8787
def create(type, *args)
88-
type = TkcItem.type2class(type.to_s) unless type.kind_of?(TkcItem)
88+
if type.kind_of?(Class) && type < TkcItem
89+
# do nothing
90+
elsif TkcItem.type2class(type.to_s)
91+
type = TkcItem.type2class(type.to_s)
92+
else
93+
fail ArgumentError, "type must a subclass of TkcItem class, or a string in CItemTypeToClass"
94+
end
8995
type.create(self, *args)
9096
end
9197

92-
9398
def addtag(tag, mode, *args)
9499
mode = mode.to_s
95100
if args[0] && mode =~ /^(above|below|with(tag)?)$/

ext/tk/sample/demos-en/tree.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def populate_tree(tree, node)
6767
path = tree.get(node, :fullpath)
6868
tree.delete(tree.children(node))
6969
Dir.glob("#{path}/*").sort.each{|f|
70-
type = File.ftype(f)
70+
type = File.ftype(f) rescue nil
7171
id = tree.insert(node, :end,
7272
:text=>File.basename(f), :values=>[f, type]).id
7373
if type == 'directory'

ext/tk/sample/demos-en/widget

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def eval_samplecode(code, file=nil)
683683
end
684684
}
685685
}
686-
Tk.update
686+
Tk.update rescue nil
687687
end
688688

689689
# invoke --
@@ -699,7 +699,7 @@ def invoke(txt, idx)
699699

700700
cursor = txt.cget('cursor')
701701
txt.cursor('watch')
702-
Tk.update
702+
Tk.update rescue nil
703703
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
704704
# Tk.update
705705
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'
10581058
no_launcher = true if ARGV.size > 0
10591059
else
10601060
# show the root widget to make it lower then demo windows
1061-
Tk.update
1061+
Tk.update rescue nil
10621062
end
10631063
ARGV.each{|cmd|
10641064
if cmd =~ /(.*).rb/

ext/tk/sample/demos-jp/tree.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def populate_tree(tree, node)
6868
path = tree.get(node, :fullpath)
6969
tree.delete(tree.children(node))
7070
Dir.glob("#{path}/*").sort.each{|f|
71-
type = File.ftype(f)
71+
type = File.ftype(f) rescue nil
7272
id = tree.insert(node, :end,
7373
:text=>File.basename(f), :values=>[f, type]).id
7474
if type == 'directory'

ext/tk/sample/demos-jp/widget

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ def eval_samplecode(code, file=nil)
740740
end
741741
}
742742
}
743-
Tk.update
743+
Tk.update rescue nil
744744
end
745745

746746
# テキスト上での click に対する動作
@@ -750,7 +750,7 @@ def invoke(txt, idx)
750750

751751
cursor = txt.cget('cursor')
752752
txt.cursor('watch')
753-
Tk.update
753+
Tk.update rescue nil
754754
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
755755
# Tk.update
756756
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'
10941094
no_launcher = true if ARGV.size > 0
10951095
else
10961096
# show the root widget to make it lower then demo windows
1097-
Tk.update
1097+
Tk.update rescue nil
10981098
end
10991099
ARGV.each{|cmd|
11001100
if cmd =~ /(.*).rb/

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#define RUBY_VERSION "2.0.0"
2-
#define RUBY_RELEASE_DATE "2013-06-16"
3-
#define RUBY_PATCHLEVEL 222
2+
#define RUBY_RELEASE_DATE "2013-06-18"
3+
#define RUBY_PATCHLEVEL 223
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 6
7-
#define RUBY_RELEASE_DAY 16
7+
#define RUBY_RELEASE_DAY 18
88

99
#include "ruby/version.h"
1010

0 commit comments

Comments
 (0)