From e6bf7809f399b4602c9b3a2aa4761da0e336fb83 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 22 Dec 2000 09:00:23 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 +++++++++- bignum.c | 19 +++++++++---------- lib/cgi.rb | 2 +- win32/Makefile.sub | 3 +-- win32/win32.c | 5 +++++ 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b1875b1dd..8c21a41275 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,15 @@ -Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto +Fri Dec 22 17:59:30 2000 Yukihiro Matsumoto * stable version 1.6.2 released. +Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada + + * win32/win32.c (myselect): avoid busy loop by adjusting fd_count. + +Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): prefix like '0x' had removed too much. + Thu Dec 21 13:01:46 2000 Tanaka Akira * lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress. diff --git a/bignum.c b/bignum.c index 8a47a449e6..1e847dd7af 100644 --- a/bignum.c +++ b/bignum.c @@ -202,32 +202,31 @@ rb_cstr2inum(str, base) while (*str && ISSPACE(*str)) str++; - if (*str == '+') { + if (str[0] == '+') { str++; } - else if (*str == '-') { + else if (str[0] == '-') { str++; sign = 0; } if (base == 0) { - if (*str == '0') { - str++; - if (*str == 'x' || *str == 'X') { - str++; + if (str[0] == '0') { + if (str[1] == 'x' || str[1] == 'X') { base = 16; } - else if (*str == 'b' || *str == 'B') { - str++; + else if (str[1] == 'b' || str[1] == 'B') { base = 2; } else { base = 8; - if (!*str) return INT2FIX(0); + if (!str[1]) return INT2FIX(0); } } + else if (str[0] == 0) { + return INT2FIX(0); + } else { base = 10; - if (!*str) return INT2FIX(0); } } if (base == 8) { diff --git a/lib/cgi.rb b/lib/cgi.rb index ed8a91d351..f850095138 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -828,7 +828,7 @@ convert string charset, and set language to "ja". eval <<-END def body.original_filename #{ - filename = (Regexp::last_match[1] or "").dup + filename = ($1 or "").dup if (/Mac/ni === env_table['HTTP_USER_AGENT']) and (/Mozilla/ni === env_table['HTTP_USER_AGENT']) and (not /MSIE/ni === env_table['HTTP_USER_AGENT']) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 403f5453b1..227ab68b18 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -102,7 +102,7 @@ OBJS = array.obj \ all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb \ $(LIBRUBY) $(MISCLIBS) - set LIB=../../win32;$(ORGLIBPATH) + set LIB=../..;$(ORGLIBPATH) @.\miniruby$(EXEEXT) -Cext extmk.rb ruby: $(PROGRAM) @@ -195,7 +195,6 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc: rbconfig.rb $(CC) $(CFLAGS) -I. -I$(fd_count > r) r = rd->fd_count; + if (wr && wr->fd_count > r) r = wr->fd_count; + if (ex && ex->fd_count > r) r = ex->fd_count; + if (nfds > r) nfds = r; if (nfds == 0 && timeout) { Sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000); return 0; -- cgit v1.2.3