|
|
c427506 |
Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb
|
|
|
c427506 |
===================================================================
|
|
|
c427506 |
--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (revision 27738)
|
|
|
c427506 |
+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (working copy)
|
|
|
c427506 |
@@ -39,7 +39,23 @@
|
|
|
c427506 |
end
|
|
|
c427506 |
fail ArgumentError, 'no widget is given' if args.empty?
|
|
|
c427506 |
params = []
|
|
|
c427506 |
- args.flatten(1).each{|win| params.push(_epath(win))}
|
|
|
c427506 |
+
|
|
|
c427506 |
+ #args.flatten(1).each{|win| params.push(_epath(win))}
|
|
|
c427506 |
+ #
|
|
|
c427506 |
+ # flatten(level) is ruby >=1.8.7 feature, substituting
|
|
|
c427506 |
+ #
|
|
|
c427506 |
+ args_flatten_one = []
|
|
|
c427506 |
+ args.each {|args1|
|
|
|
c427506 |
+ if args1.is_a? Array then
|
|
|
c427506 |
+ args1.each {|args2|
|
|
|
c427506 |
+ args_flatten_one << args2
|
|
|
c427506 |
+ }
|
|
|
c427506 |
+ else
|
|
|
c427506 |
+ args_flatten_one << args1
|
|
|
c427506 |
+ end
|
|
|
c427506 |
+ }
|
|
|
c427506 |
+ args_flatten_one.each{|win| params.push(_epath(win))}
|
|
|
c427506 |
+
|
|
|
c427506 |
opts.each{|k, v|
|
|
|
c427506 |
params.push("-#{k}")
|
|
|
c427506 |
params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable)
|
|
|
c427506 |
Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb
|
|
|
c427506 |
===================================================================
|
|
|
c427506 |
--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (revision 27738)
|
|
|
c427506 |
+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (working copy)
|
|
|
c427506 |
@@ -63,7 +63,23 @@
|
|
|
c427506 |
end
|
|
|
c427506 |
fail ArgumentError, 'no widget is given' if args.empty?
|
|
|
c427506 |
params = []
|
|
|
c427506 |
- args.flatten(1).each{|win|
|
|
|
c427506 |
+
|
|
|
c427506 |
+ #args.flatten(1).each{|win|
|
|
|
c427506 |
+ #
|
|
|
c427506 |
+ # flatten(level) is ruby >=1.8.7 feature, substituting
|
|
|
c427506 |
+ #
|
|
|
c427506 |
+
|
|
|
c427506 |
+ args_flatten_one = []
|
|
|
c427506 |
+ args.each {|args1|
|
|
|
c427506 |
+ if args1.is_a? Array then
|
|
|
c427506 |
+ args1.each {|args2|
|
|
|
c427506 |
+ args_flatten_one << args2
|
|
|
c427506 |
+ }
|
|
|
c427506 |
+ else
|
|
|
c427506 |
+ args_flatten_one << args1
|
|
|
c427506 |
+ end
|
|
|
c427506 |
+ }
|
|
|
c427506 |
+ args_flatten_one.each{|win|
|
|
|
c427506 |
case win
|
|
|
c427506 |
when '-', ?- # RELATIVE PLACEMENT (increase columnspan)
|
|
|
c427506 |
params.push('-')
|