summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-16 04:24:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-16 04:24:38 +0000
commit16487ee284f17cfbf6fad9f6b2fedc57f0f37e0a (patch)
tree0c0aab325ab782ff559d1cfa5df269e786219ee3 /lib
parent83687c4eb47e2bcbe463d097317d068d1dd0b734 (diff)
baseline
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi-lib.rb6
-rw-r--r--lib/tk.rb10
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb
index 2407c6b..362d13f 100644
--- a/lib/cgi-lib.rb
+++ b/lib/cgi-lib.rb
@@ -60,7 +60,11 @@ class CGI < SimpleDelegator
read_from_cmdline
end.split(/&/).each do |x|
key, val = x.split(/=/,2).collect{|x|unescape(x)}
- @inputs[key] += ("\0" if @inputs[key]) + (val or "")
+ if @inputs.include?('key')
+ @inputs[key] += "\0" + (val or "")
+ else
+ @inputs[key] = (val or "")
+ end
end
super(@inputs)
diff --git a/lib/tk.rb b/lib/tk.rb
index 62b275b..b44f585 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -812,11 +812,11 @@ module TkGrid
end
def columnconfigure(master, index, *args)
- tk_call "grid", 'columnconfigure', master, index, *hash_kv(keys)
+ tk_call "grid", 'columnconfigure', master, index, *hash_kv(args)
end
def rowconfigure(master, index, *args)
- tk_call "grid", 'rowconfigure', master, index, *hash_kv(keys)
+ tk_call "grid", 'rowconfigure', master, index, *hash_kv(args)
end
def add(widget, *args)
@@ -1301,10 +1301,10 @@ class TkMenu<TkWindow
def index(index)
tk_send 'index', index
end
- def invoke
- tk_send 'invoke'
+ def invoke(index)
+ tk_send 'invoke', index
end
- def insert(index, type, *keys)
+ def insert(index, type, keys=nil)
tk_send 'add', index, type, *hash_kv(keys)
end
def post(x, y)