[#5322] O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...>
I just did some benchmarks on push, pop, shift, and unshift
On Fri, 1 Jul 2005, Eric Mahurin wrote:
--- Mathieu Bouchard <matju@artengine.ca> wrote:
On Sat, 2 Jul 2005, Eric Mahurin wrote:
--- Mathieu Bouchard <matju@artengine.ca> wrote:
On Sun, 3 Jul 2005, Eric Mahurin wrote:
--- Mathieu Bouchard <matju@artengine.ca> wrote:
Hi,
--- Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
Hi,
Yukihiro Matsumoto wrote:
--- Florian Gro<florgro@gmail.com> wrote:
Eric Mahurin wrote:
--- Nikolai Weibull
Eric Mahurin wrote:
[#5388] Problem with socket communications on Windows — "Jim McMaster" <jim.mcmaster@...>
I recently installed PGP 9.0 on my Windows XP SP2 machine. At that point,
[#5391] Object#=~ — Ryan Davis <ryand-ruby@...>
Since Rexexp#=~ and String#=~ return nil if they fail to match,
Hi,
Hi,
--- Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
[#5409] socket.c - s_recvfrom — Zach Dennis <zdennis@...>
If I am reading s_recvfrom correctly in can throw an error which kills
[#5420] Sydney Developer Preview 1 released — Evan Webb <evanwebb@...>
Sydney, an experimental ruby interpreter, has been released!
Thanks everyone for the feedback so far!
Hi,
The MD5 sum is 53d1bde4542365caf4849c56e6274617.
Hi,
On 7/12/05, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
Hi,
Hello,
[#5445] GC tweak — Stefan Kaes <skaes@...>
I have found that the performance of current garbage collector
[#5451] bug in pstore (ruby 1.8.2) on Windows ( Win XP) ? — noreply@...
Bugs item #2101, was opened at 2005-07-14 15:30
[#5470] Bogus age value from Etc — Daniel Berger <Daniel.Berger@...>
Hi all,
[#5471] make fail; ruby v182 not finding readline ? — OpenMacNews <OpenMacNews@...>
hi all,
[#5476] Bug in ruby's command line parsing — Lothar Scholz <mailinglists@...>
Hello,
On Sat, Jul 16, 2005 at 10:11:34AM +0900, Lothar Scholz wrote:
[#5492] ruby ( v183) bcc32: using Socket.new with timeout -> files not closed — noreply@...
Bugs item #2131, was opened at 2005-07-19 17:34
Re: [ ruby-Bugs-2131 ] ruby ( v183) bcc32: using Socket.new with timeout -> files not closed
Hi.
>That result was INCORRECT.
> (ISP maintenance when I ran that script yesterday)
>Sorry for the confusion.
>
>This is the result after the win32 'setmode' patch:
>
>["Net::HTTP", "1.126", "1.1"]
>D:/RUBY/SRC_CVSINST/lib/ruby/1.9/net/protocol.rb:70:in `close': Bad file number (Errno::EBADF)
Sorry, setmode() accepted only text mode flags (O_TEXT, O_BINARY). That magic number
was simply ignored.
I installed win98 onto another HDD and tried by myself. Yes, definitly fails with
EBADF. (This is not ZoneAlarm's fault)
I needed this patch to compile ruby-bccwin32 on win98.
"copy" => "xcopy" is needed because "copy" cannot handle the path terminated with \.
I don't know how to remove it, so I used xcopy instead.
Index: bcc32/Makefile.sub
===================================================================
RCS file: /src/ruby/bcc32/Makefile.sub,v
retrieving revision 1.79
diff -u -w -b -p -r1.79 Makefile.sub
--- bcc32/Makefile.sub 1 Jun 2005 02:35:35 -0000 1.79
+++ bcc32/Makefile.sub 24 Jul 2005 11:35:04 -0000
@@ -285,7 +285,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)bcc32/M
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
- @exit > $@
+ @exit > $(@:/=\)
config.status: $(MKFILES) $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk
@echo Creating $@
@@ -340,8 +340,8 @@ s,@AR@,$(AR),;t t
s,@ARFLAGS@,$(ARFLAGS) ,;t t
s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,$(SET_MAKE),;t t
-s,@CP@,copy > nul,;t t
-s,@INSTALL@,copy > nul,;t t
+s,@CP@,xcopy > nul,;t t
+s,@INSTALL@,xcopy > nul,;t t
s,@INSTALL_PROG@,$$(INSTALL),;t t
s,@INSTALL_DATA@,$$(INSTALL),;t t
s,@LIBOBJS@, acosh.obj crypt.obj erf.obj win32.obj,;t t
And another patch. By this patch, your sample code worked fine.
# _close calls CloseHandle for socket, and closesocket is called after the call.
# We should not close the handle twice anyway.
But MSDN says the socket handle socket() and WSASocket() opens must be
closed by corresponding closesocket(), they are not refering to CloseHandle().
# If so, I think it's not good to call _open_osfhandle for socket
# from the begining.
Index: win32/win32.c
===================================================================
RCS file: /src/ruby/win32/win32.c,v
retrieving revision 1.160
diff -u -w -b -p -r1.160 win32.c
--- win32/win32.c 16 Jul 2005 06:59:05 -0000 1.160
+++ win32/win32.c 24 Jul 2005 14:02:18 -0000
@@ -3504,6 +3504,9 @@ rb_w32_fclose(FILE *fp)
UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
return fclose(fp);
}
+#ifdef __BORLANDC__
+ return fclose(fp); /* ouch! CloseHandle for socket */
+#else
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
fclose(fp);
if (closesocket(sock) == SOCKET_ERROR) {
@@ -3511,6 +3514,7 @@ rb_w32_fclose(FILE *fp)
return -1;
}
return 0;
+#endif
}
int
@@ -3522,6 +3526,9 @@ rb_w32_close(int fd)
UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
return _close(fd);
}
+#ifdef __BORLANDC__
+ return _close(fd); /* ouch! CloseHandle for socket */
+#else
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
_close(fd);
if (closesocket(sock) == SOCKET_ERROR) {
@@ -3529,6 +3536,7 @@ rb_w32_close(int fd)
return -1;
}
return 0;
+#endif
}
static int