* io.c (rb_io_fread): may lose data on nonblocking read.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-03-23 15:38:44 +00:00
Родитель 5aadcd9349
Коммит 94f40186c0
4 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -24,6 +24,10 @@ Sat Mar 22 12:44:15 2003 Tanaka Akira <akr@m17n.org>
* lib/date/format.rb, lib/uri/common.rb: `[', `]', `-' in chracter * lib/date/format.rb, lib/uri/common.rb: `[', `]', `-' in chracter
class in regexp to avoid warning. class in regexp to avoid warning.
Sat Mar 22 07:39:32 2003 Ulf Betlehem <flu@iki.fi>
* io.c (rb_io_fread): may lose data on nonblocking read.
Fri Mar 21 23:40:41 2003 Tanaka Akira <akr@m17n.org> Fri Mar 21 23:40:41 2003 Tanaka Akira <akr@m17n.org>
* regex.c (re_compile_pattern): fix previous change. * regex.c (re_compile_pattern): fix previous change.

2
io.c
Просмотреть файл

@ -710,7 +710,7 @@ rb_io_fread(ptr, len, f)
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
case EWOULDBLOCK: case EWOULDBLOCK:
#endif #endif
if (len - n > 0) { if (len - n >= 0) {
clearerr(f); clearerr(f);
return len - n; return len - n;
} }

Просмотреть файл

@ -407,9 +407,7 @@ end
class Fixnum class Fixnum
if not defined? Rational alias power! **
alias power! **
end
# Redefined to handle a Complex argument. # Redefined to handle a Complex argument.
def ** (other) def ** (other)
@ -430,9 +428,7 @@ class Fixnum
end end
class Bignum class Bignum
if not defined? Rational alias power! **
alias power! **
end
end end
class Float class Float
@ -459,7 +455,11 @@ module Math
Complex(0,sqrt!(-z)) Complex(0,sqrt!(-z))
end end
else else
z**Rational(1,2) if defined? Rational
z**Rational(1,2)
else
z**0.5
end
end end
end end

Просмотреть файл

@ -59,13 +59,13 @@ class String
def end_regexp def end_regexp
case $KCODE[0] case $KCODE[0]
when ?s, ?S when ?s, ?S
/#{PATTERN_SJIS}$/o /#{PATTERN_SJIS}$/on
when ?e, ?E when ?e, ?E
/#{PATTERN_EUC}$/o /#{PATTERN_EUC}$/on
when ?u, ?U when ?u, ?U
/#{PATTERN_UTF8}$/o /#{PATTERN_UTF8}$/on
else else
/.$/o /.$/on
end end
end end