2000-06-14-2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8c4f656b6c
commit
1199a7d3d6
24
ChangeLog
24
ChangeLog
@ -1,5 +1,23 @@
|
|||||||
|
Wed Jun 14 17:01:41 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
||||||
|
|
||||||
|
* rubytest.rb: add CONFIG['EXEEXT'] to the executable file name.
|
||||||
|
|
||||||
Wed Jun 14 14:50:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Wed Jun 14 14:50:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* string.c (rb_f_sub): assign to $_ only if modification happens.
|
||||||
|
|
||||||
|
* string.c (rb_f_gsub): ditto.
|
||||||
|
|
||||||
|
* string.c (rb_f_chop): ditto.
|
||||||
|
|
||||||
|
* string.c (rb_f_chomp): ditto.
|
||||||
|
|
||||||
|
* io.c (io_reopen): preserve file position by ftell/fseek, if io
|
||||||
|
is a seekable.
|
||||||
|
|
||||||
|
* eval.c (method_arity): wrong arity number for the methods with
|
||||||
|
optional arguments.
|
||||||
|
|
||||||
* time.c (make_time_t): opposite timezone shift (should be negative).
|
* time.c (make_time_t): opposite timezone shift (should be negative).
|
||||||
|
|
||||||
Wed Jun 14 14:07:38 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
Wed Jun 14 14:07:38 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
@ -73,7 +91,7 @@ Fri Jun 9 15:11:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
|||||||
|
|
||||||
* time.c (make_time_t): supports daylight saving time.
|
* time.c (make_time_t): supports daylight saving time.
|
||||||
|
|
||||||
* eval.c (rb_thread_safe_level): should retrive current $SAFE
|
* eval.c (rb_thread_safe_level): should retrieve current $SAFE
|
||||||
value if a thread is the current thread.
|
value if a thread is the current thread.
|
||||||
|
|
||||||
Thu Jun 8 14:25:45 2000 Hiroshi Igarashi <iga@ruby-lang.org>
|
Thu Jun 8 14:25:45 2000 Hiroshi Igarashi <iga@ruby-lang.org>
|
||||||
@ -111,7 +129,7 @@ Mon Jun 5 00:13:35 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
|||||||
|
|
||||||
Sun Jun 4 03:17:36 2000 Wakou Aoyama <wakou@fsinet.or.jp>
|
Sun Jun 4 03:17:36 2000 Wakou Aoyama <wakou@fsinet.or.jp>
|
||||||
|
|
||||||
* lib/cig.rb: improve: CGI::pretty()
|
* lib/cgi.rb: improve: CGI::pretty()
|
||||||
|
|
||||||
Sun Jun 4 02:01:10 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
Sun Jun 4 02:01:10 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
@ -381,7 +399,7 @@ May 16 19:45:32 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
|
|||||||
|
|
||||||
* intern.h: use EXTERN instead of extern.
|
* intern.h: use EXTERN instead of extern.
|
||||||
|
|
||||||
* win32/ruby.h: add rb_defout, rb_stdout, ruby_errinfo,
|
* win32/ruby.def: add rb_defout, rb_stdout, ruby_errinfo,
|
||||||
ruby_sourceline, ruby_sourcefile to work with eruby
|
ruby_sourceline, ruby_sourcefile to work with eruby
|
||||||
reported by Hiroshi Saito <HiroshiSaito@pob.org>.
|
reported by Hiroshi Saito <HiroshiSaito@pob.org>.
|
||||||
Export both ruby_xmalloc and xmalloc etc.
|
Export both ruby_xmalloc and xmalloc etc.
|
||||||
|
3
eval.c
3
eval.c
@ -6165,7 +6165,8 @@ method_arity(method)
|
|||||||
body = body->nd_head;
|
body = body->nd_head;
|
||||||
if (!body) return INT2FIX(0);
|
if (!body) return INT2FIX(0);
|
||||||
n = body->nd_cnt;
|
n = body->nd_cnt;
|
||||||
if (body->nd_rest >= 0) n = -n-1;
|
if (body->nd_opt || body->nd_rest >= 0)
|
||||||
|
n = -n-1;
|
||||||
return INT2FIX(n);
|
return INT2FIX(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
io.c
7
io.c
@ -1755,6 +1755,7 @@ io_reopen(io, nfile)
|
|||||||
OpenFile *fptr, *orig;
|
OpenFile *fptr, *orig;
|
||||||
char *mode;
|
char *mode;
|
||||||
int fd;
|
int fd;
|
||||||
|
long pos;
|
||||||
|
|
||||||
nfile = rb_io_get_io(nfile);
|
nfile = rb_io_get_io(nfile);
|
||||||
if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
|
if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
|
||||||
@ -1764,6 +1765,9 @@ io_reopen(io, nfile)
|
|||||||
GetOpenFile(nfile, orig);
|
GetOpenFile(nfile, orig);
|
||||||
|
|
||||||
if (fptr == orig) return io;
|
if (fptr == orig) return io;
|
||||||
|
if (orig->mode & FMODE_READABLE) {
|
||||||
|
pos = ftell(orig->f);
|
||||||
|
}
|
||||||
if (orig->f2) {
|
if (orig->f2) {
|
||||||
if (fflush(orig->f2) == EOF) rb_sys_fail(orig->path);
|
if (fflush(orig->f2) == EOF) rb_sys_fail(orig->path);
|
||||||
}
|
}
|
||||||
@ -1793,6 +1797,9 @@ io_reopen(io, nfile)
|
|||||||
if (dup2(fileno(orig->f), fd) < 0)
|
if (dup2(fileno(orig->f), fd) < 0)
|
||||||
rb_sys_fail(orig->path);
|
rb_sys_fail(orig->path);
|
||||||
fptr->f = rb_fdopen(fd, mode);
|
fptr->f = rb_fdopen(fd, mode);
|
||||||
|
if (orig->mode & FMODE_READABLE && pos >= 0) {
|
||||||
|
fseek(fptr->f, pos, SEEK_SET);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fptr->f2) {
|
if (fptr->f2) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
include Config
|
include Config
|
||||||
|
|
||||||
unless File.exist? "./#{CONFIG['ruby_install_name']}"
|
unless File.exist? "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}"
|
||||||
print "./#{CONFIG['ruby_install_name']} is not found.\n"
|
print "./#{CONFIG['ruby_install_name']} is not found.\n"
|
||||||
print "Try `make' first, then `make test', please.\n"
|
print "Try `make' first, then `make test', please.\n"
|
||||||
exit 0
|
exit 0
|
||||||
|
39
string.c
39
string.c
@ -1313,11 +1313,13 @@ rb_f_sub(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
VALUE str = rb_str_dup(uscore_get());
|
VALUE str = uscore_get();
|
||||||
|
VALUE dup = rb_str_dup(str);
|
||||||
|
|
||||||
rb_str_sub_bang(argc, argv, str);
|
if (NIL_P(rb_str_sub_bang(argc, argv, dup)))
|
||||||
rb_lastline_set(str);
|
return str;
|
||||||
return str;
|
rb_lastline_set(dup);
|
||||||
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -1333,11 +1335,13 @@ rb_f_gsub(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
VALUE str = rb_str_dup(uscore_get());
|
VALUE str = uscore_get();
|
||||||
|
VALUE dup = rb_str_dup(str);
|
||||||
|
|
||||||
rb_str_gsub_bang(argc, argv, str);
|
if (NIL_P(rb_str_gsub_bang(argc, argv, dup)))
|
||||||
rb_lastline_set(str);
|
return str;
|
||||||
return str;
|
rb_lastline_set(dup);
|
||||||
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -2356,10 +2360,13 @@ rb_f_chop_bang(str)
|
|||||||
static VALUE
|
static VALUE
|
||||||
rb_f_chop()
|
rb_f_chop()
|
||||||
{
|
{
|
||||||
VALUE str = rb_str_dup(uscore_get());
|
VALUE str = uscore_get();
|
||||||
|
|
||||||
rb_str_chop_bang(str);
|
if (RSTRING(str)->len > 0) {
|
||||||
rb_lastline_set(str);
|
str = rb_str_dup(str);
|
||||||
|
rb_str_chop_bang(str);
|
||||||
|
rb_lastline_set(str);
|
||||||
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2432,11 +2439,13 @@ rb_f_chomp(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
VALUE str = rb_str_dup(uscore_get());
|
VALUE str = uscore_get();
|
||||||
|
VALUE dup = rb_str_dup(str);
|
||||||
|
|
||||||
rb_str_chomp_bang(argc, argv, str);
|
if (NIL_P(rb_str_chomp_bang(argc, argv, dup)))
|
||||||
rb_lastline_set(str);
|
return str;
|
||||||
return str;
|
rb_lastline_set(dup);
|
||||||
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user