summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-05 06:53:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-05 06:53:33 +0000
commit0986c829261354e77f6764317dee6e2b1ef771c6 (patch)
treead5c28bc685e9a87c235e283f5d098e825bba287 /ext
parentdabb7728c66c36620ea10dc399dd16bff2240e23 (diff)
* ruby.c (proc_options): should not adjust argc/argv if -e option
is supplied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c8
-rw-r--r--ext/tk/lib/tk.rb6
-rw-r--r--ext/tk/lib/tkcanvas.rb2
-rw-r--r--ext/tk/lib/tktext.rb20
4 files changed, 19 insertions, 17 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index f10952ef4b..5981659449 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -450,8 +450,8 @@ s_recvfrom(sock, argc, argv, from)
str = rb_tainted_str_new(0, NUM2INT(len));
- rb_thread_wait_fd(fd);
retry:
+ rb_thread_wait_fd(fd);
TRAP_BEG;
RSTRING(str)->len = recvfrom(fd, RSTRING(str)->ptr, RSTRING(str)->len, flags,
(struct sockaddr*)buf, &alen);
@@ -467,7 +467,6 @@ s_recvfrom(sock, argc, argv, from)
#if EAGAIN != EWOULDBLOCK
case EAGAIN:
#endif
- rb_thread_wait_fd(fd);
goto retry;
}
rb_sys_fail("recvfrom(2)");
@@ -1066,9 +1065,13 @@ s_accept(class, fd, sockaddr, len)
rb_secure(3);
retry:
rb_thread_wait_fd(fd);
+#if defined(_nec_ews)
+ fd2 = accept(fd, sockaddr, len);
+#else
TRAP_BEG;
fd2 = accept(fd, sockaddr, len);
TRAP_END;
+#endif
if (fd2 < 0) {
switch (errno) {
case EMFILE:
@@ -1085,7 +1088,6 @@ s_accept(class, fd, sockaddr, len)
#if EAGAIN != EWOULDBLOCK
case EAGAIN:
#endif
- rb_thread_wait_fd(fd);
goto retry;
}
rb_sys_fail(0);
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 7bbba06151..99f41420cc 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -2233,7 +2233,7 @@ class TkObject<TkKernel
def cget(slot)
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
tk_call path, 'cget', "-#{slot}"
else
tk_tcl2ruby tk_call path, 'cget', "-#{slot}"
@@ -2273,7 +2273,7 @@ class TkObject<TkKernel
else
if slot
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
conf = tk_split_simplelist(tk_send('configure', "-#{slot}") )
else
conf = tk_split_list(tk_send('configure', "-#{slot}") )
@@ -2285,7 +2285,7 @@ class TkObject<TkKernel
conf = tk_split_simplelist(conflist)
conf[0] = conf[0][1..-1]
case conf[0]
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
else
if conf[3]
if conf[3].index('{')
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
index 9b323e9cbb..a546b222d8 100644
--- a/ext/tk/lib/tkcanvas.rb
+++ b/ext/tk/lib/tkcanvas.rb
@@ -876,7 +876,7 @@ class TkPhotoImage<TkImage
def cget(option)
case option
- when 'data', 'flie'
+ when 'data', 'file'
tk_send 'cget', option
else
tk_tcl2ruby tk_send 'cget', option
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 51b5d82b60..6ec738edb0 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -279,7 +279,7 @@ class TkText<TkTextWin
def tag_cget(tag, key)
case key
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
tk_call @path, 'tag', 'cget', tag, "-#{key}"
else
tk_tcl2ruby tk_call @path, 'tag', 'cget', tag, "-#{key}"
@@ -308,7 +308,7 @@ class TkText<TkTextWin
def tag_configinfo(tag, key=nil)
if key
case key
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
conf = tk_split_simplelist(tk_send('tag','configure',tag,"-#{key}"))
else
conf = tk_split_list(tk_send('tag','configure',tag,"-#{key}"))
@@ -320,7 +320,7 @@ class TkText<TkTextWin
conf = tk_split_simplelist(conflist)
conf[0] = conf[0][1..-1]
case conf[0]
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
else
if conf[3]
if conf[3].index('{')
@@ -712,7 +712,7 @@ class TkTextTag<TkObject
def cget(key)
case key
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
tk_call @t.path, 'tag', 'cget', @id, "-#{key}"
else
tk_tcl2ruby tk_call @t.path, 'tag', 'cget', @id, "-#{key}"
@@ -896,7 +896,7 @@ class TkTextWindow<TkObject
def cget(slot)
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
tk_call @t.path, 'window', 'cget', @index, "-#{slot}"
else
tk_tcl2ruby tk_call @t.path, 'window', 'cget', @index, "-#{slot}"
@@ -947,7 +947,7 @@ class TkTextWindow<TkObject
def configinfo(slot = nil)
if slot
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
conf = tk_split_simplelist(tk_call @t.path, 'window', 'configure',
@index, "-#{slot}")
else
@@ -962,7 +962,7 @@ class TkTextWindow<TkObject
conf = tk_split_simplelist(conflist)
conf[0] = conf[0][1..-1]
case conf[0]
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
else
if conf[3]
if conf[3].index('{')
@@ -1017,7 +1017,7 @@ class TkTextImage<TkObject
def cget(slot)
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
tk_call @t.path, 'image', 'cget', @index, "-#{slot}"
else
tk_tcl2ruby tk_call @t.path, 'image', 'cget', @index, "-#{slot}"
@@ -1046,7 +1046,7 @@ class TkTextImage<TkObject
def configinfo(slot = nil)
if slot
case slot
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
conf = tk_split_simplelist(tk_call @t.path, 'image', 'configure',
@index, "-#{slot}")
else
@@ -1061,7 +1061,7 @@ class TkTextImage<TkObject
conf = tk_split_simplelist(conflist)
conf[0] = conf[0][1..-1]
case conf[0]
- when 'text', 'label', 'show', 'data', 'flie'
+ when 'text', 'label', 'show', 'data', 'file'
else
if conf[3]
if conf[3].index('{')