1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-12-28 04:45:16 +00:00
parent bb499cc2cb
commit fd850de8a8
9 changed files with 114 additions and 47 deletions

View file

@ -1,9 +1,9 @@
.cvsignore
parse.c
newver.rb
ruby
miniruby
README.fat-patch
configure
config.cache
config.h
config.log
@ -11,7 +11,6 @@ config.status
Makefile
ppack
archive
extmk.rb
*.orig
*.rej
*.bak

View file

@ -1,3 +1,34 @@
Tue Dec 26 18:46:41 2000 NAKAMURA Hiroshi <nakahiro@sarion.co.jp>
* lib/debug.rb: Avoid thread deadlock in debugging stopped thread.
* lib/debug.rb: Uncleared 'finish' state.
Tue Dec 26 16:53:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_yield_0): remove dvar node by rb_gc_force_recycle()
more eagerly.
* eval.c (rb_f_binding): recycling should be stopped for outer
scope too.
* eval.c (proc_new): ditto.
Tue Dec 26 15:45:35 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_inspect): should treat multibyte chracters
properly.
Mon Dec 25 17:49:08 2000 K.Kosako <kosako@sofnec.co.jp>
* string.c (rb_str_replace_m): unexpected string share happens if
replace is done for associated (STR_NO_ORIG) string.
Tue Dec 26 15:01:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (rb_f_p): should not call rb_io_flush() if rb_defout is not
a IO (T_FILE).
Mon Dec 25 15:52:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.2 released.
@ -837,7 +868,7 @@ Sat Sep 23 03:06:25 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Fri Sep 22 15:46:21 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/net/http.rb: too early parameter expantion in string.
* lib/net/http.rb: too early parameter expansion in string.
Fri Sep 22 13:58:51 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
@ -894,7 +925,7 @@ Wed Sep 20 23:21:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Wed Sep 20 14:01:45 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_provided): detect infnite load loop.
* eval.c (rb_provided): detect infinite load loop.
* eval.c (rb_provided): too weak filename comparison.
@ -959,7 +990,7 @@ Thu Sep 14 02:46:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Wed Sep 13 17:01:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* bignum.c (rb_big_eq): imcomplete value compare of bignums.
* bignum.c (rb_big_eq): incomplete value comparison of bignums.
Wed Sep 13 06:39:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
@ -1084,7 +1115,7 @@ Fri Sep 1 10:36:29 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (aref_args,opt_call_args): add block_call to allow a
method without parentheses and with block as a last argument.
* hash.c (rb_hash_sort): should not retrun nil.
* hash.c (rb_hash_sort): should not return nil.
* re.c (match_aref): should use rb_reg_nth_match().
@ -1252,7 +1283,7 @@ Fri Aug 11 15:43:46 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Thu Aug 10 08:05:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_callcc): returned current thread instaed of
* eval.c (rb_callcc): returned current thread instead of
continuation wrongly.
Thu Aug 10 05:40:28 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
@ -1425,7 +1456,7 @@ Tue Jul 18 14:58:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
Mon Jul 17 04:29:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/mkmf.rb: converts extention of $objs into $OBJEXT.
* lib/mkmf.rb: converts extension of $objs into $OBJEXT.
Sun Jul 16 03:02:34 2000 Dave Thomas <dave@thomases.com>
@ -1522,7 +1553,7 @@ Mon Jul 10 09:07:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
Sat Jul 8 23:08:40 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_thread_start_0): should copy previous scopes to
prevent rb_gc_force_recylce().
prevent rb_gc_force_recycle().
Fri Jul 7 23:36:36 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
@ -1597,7 +1628,7 @@ Wed Jul 5 09:47:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* time.c (time_arg): Time::local, Time::gm now take 7th optional
argument for usec.
* numeric.c (num_ceil, etc): default ceil, floor, round, trancate
* numeric.c (num_ceil, etc): default ceil, floor, round, truncate
implementation for Numeric, using `to_f'.
* io.c (rb_io_reopen): clear fptr->path after free() to prevent
@ -1688,7 +1719,7 @@ Mon Jul 3 13:15:02 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* bignum.c (rb_big_divmod): ditto.
* numeric.c (fixdivmod): does not depend C's undifined %
* numeric.c (fixdivmod): does not depend C's undefined %
behavior. adopt to fmod(3m) behavior.
* numeric.c (flo_mod): modulo now reserves fmod(3m) behavior.
@ -1731,7 +1762,7 @@ Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_eval): the value from RTEST() is not valid Ruby
objct. result should be either true or false.
object. result should be either true or false.
Sat Jul 1 09:30:06 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
@ -3924,7 +3955,7 @@ Thu Oct 21 16:14:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* ruby.c (proc_options): use RUBYOPT environment variable to
retrieve the default options.
* dir.c (fnmatch): use eban's fnmatch; do not depend on systems's
* dir.c (fnmatch): use eban's fnmatch; do not depend on system's
fnmatch (which may have portability problem) anymore.
Wed Oct 20 15:14:24 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
@ -6519,7 +6550,7 @@ Sun Nov 1 01:18:52 1998 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
Sat Oct 31 23:18:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* string.c (rb_str_split_method): negative LIMIT means number of
splitted fields are unlimited, as in perl.
split fields are unlimited, as in perl.
* string.c (rb_str_split_method): if LIMIT is unspecified,
trailing null fields are stripped.
@ -8775,7 +8806,7 @@ Wed Nov 12 13:44:47 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
Mon Nov 10 11:24:51 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
* regex.c (re_compile_pattern): non-resitering parens (?:..).
* regex.c (re_compile_pattern): non-registering parens (?:..).
* regex.c (re_compile_pattern): new meta character \< (wordbeg)
and \> (wordend).
@ -9031,7 +9062,7 @@ Tue Sep 16 17:54:25 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
* ruby.c (ruby_prog_init): close stdaux and stdprn for MSDOS.
* ruby.c (ruby_prog_init): should not add path from environment
variable, if ruby is running under seuid.
variable, if ruby is running under setuid.
* process.c (init_ids): check suid check for setuid/seteuid etc.

15
README
View file

@ -46,11 +46,14 @@ in the mail body (not subject) to the address <ruby-talk-ctl@netlab.co.jp>.
This is what you need to do to compile and install Ruby:
1. Run ./configure, which will generate config.h and Makefile.
1. If ./configure does not exist or is older than configure.in,
run autoconf to (re)generate configure.
2. Edit defines.h if you need. Probably this step will not need.
2. Run ./configure, which will generate config.h and Makefile.
3. Remove comment mark(#) before the module names from ext/Setup (or
3. Edit defines.h if you need. Probably this step will not need.
4. Remove comment mark(#) before the module names from ext/Setup (or
add module names if not present), if you want to link modules
statically.
@ -59,13 +62,13 @@ This is what you need to do to compile and install Ruby:
remove comment mark from the line "#option nodynamic" in
ext/Setup.
4. Run make.
5. Run make.
5. Optionally, run 'make test' to check whether the compiled Ruby
6. Optionally, run 'make test' to check whether the compiled Ruby
interpreter works well. If you see the message "test succeeded",
your ruby works as it should (hopefully).
6. Run 'make install'
7. Run 'make install'
You may have to be a super user to install ruby.

View file

@ -78,13 +78,17 @@ Ruby
以下の手順で行ってください.
1. configureを実行してMakefileなどを生成する
1. もしconfigureファイルが見つからない、もしくは
configure.inより古いようなら、autoconfを実行して
新しくconfigureを生成する
2. (必要ならば)defines.hを編集する
2. configureを実行してMakefileなどを生成する
3. (必要ならば)defines.hを編集する
多分,必要無いと思います.
3. (必要ならば)ext/Setupに静的にリンクする拡張モジュールを
4. (必要ならば)ext/Setupに静的にリンクする拡張モジュールを
指定する
ext/Setupに記述したモジュールは静的にリンクされます
@ -95,14 +99,14 @@ Ruby
拡張モジュールを利用するためには,あらかじめ静的にリン
クしておく必要があります.
4. makeを実行してコンパイルする
5. makeを実行してコンパイルする
5. make testでテストを行う
6. make testでテストを行う
「test succeeded」と表示されれば成功ですただしテスト
に成功しても完璧だと保証されている訳ではありません.
6. make install
7. make install
rootで作業する必要があるかもしれません

View file

@ -370,7 +370,7 @@ def create_makefile(target)
if $configure_args['--enable-shared'] or "@LIBRUBY@" != "@LIBRUBY_A@"
$libs = "@LIBRUBYARG@ " + $libs
$LIBPATH |= [$topdir]
$LIBPATH.unshift $topdir
end
defflag = ''

2
io.c
View file

@ -2156,7 +2156,9 @@ rb_f_p(argc, argv)
for (i=0; i<argc; i++) {
rb_p(argv[i]);
}
if (TYPE(rb_defout) == T_FILE) {
rb_io_flush(rb_defout);
}
return Qnil;
}

View file

@ -54,7 +54,9 @@ class CGI
@output_cookies = [
Cookie::new("name" => session_key,
"value" => id,
"path" => if ENV["SCRIPT_NAME"] then
"path" => if ENV["PATH_INFO"] then
File::dirname(ENV["PATH_INFO"])
elsif ENV["SCRIPT_NAME"] then
File::dirname(ENV["SCRIPT_NAME"])
else
""

View file

@ -98,13 +98,25 @@ class DEBUGGER__
@stop_next = n
end
def suspend
def set_suspend
@suspend_next = true
end
def clear_suspend
@suspend_next = false
end
def suspend_all
DEBUGGER__.suspend
end
def resume_all
DEBUGGER__.resume
end
def check_suspend
while (Thread.critical = true; @suspend_next)
waiting.push Thread.current
DEBUGGER__.waiting.push Thread.current
@suspend_next = false
Thread.stop
end
@ -131,14 +143,18 @@ class DEBUGGER__
DEBUGGER__.display
end
def waiting
DEBUGGER__.waiting
def context(th)
DEBUGGER__.context(th)
end
def set_trace_all(arg)
DEBUGGER__.set_trace(arg)
end
def set_last_thread(th)
DEBUGGER__.set_last_thread(th)
end
def debug_eval(str, binding)
begin
val = eval(str, binding)
@ -237,7 +253,7 @@ class DEBUGGER__
def debug_command(file, line, id, binding)
MUTEX.lock
DEBUGGER__.set_last_thread(Thread.current)
set_last_thread(Thread.current)
frame_pos = 0
binding_file = file
binding_line = line
@ -506,7 +522,7 @@ class DEBUGGER__
end
end
MUTEX.unlock
DEBUGGER__.resume_all_thread
resume_all
end
def debug_print_help
@ -662,14 +678,14 @@ EOHELP
stdout.printf "\tfrom %s\n", i
end
end
DEBUGGER__.suspend_all_thread
suspend_all
debug_command(file, line, id, binding)
end
end
def trace_func(event, file, line, id, binding, klass)
Tracer.trace_func(event, file, line, id, binding, klass) if trace?
DEBUGGER__.context(Thread.current).check_suspend
context(Thread.current).check_suspend
@file = file
@line = line
case event
@ -687,7 +703,7 @@ EOHELP
@stop_next = 1
else
@no_step = nil
DEBUGGER__.suspend_all_thread
suspend_all
debug_command(file, line, id, binding)
@last = [file, line]
end
@ -697,7 +713,7 @@ EOHELP
@frames.unshift [binding, file, line, id]
if check_break_points(file, id.id2name, binding, id) or
check_break_points(klass.to_s, id.id2name, binding, id)
DEBUGGER__.suspend_all_thread
suspend_all
debug_command(file, line, id, binding)
end
@ -710,6 +726,7 @@ EOHELP
when 'return', 'end'
if @frames.size == @finish_pos
@stop_next = 1
@finish_pos = 0
end
@frames.shift
@ -767,20 +784,25 @@ EOHELP
@last_thread = th
end
def suspend_all_thread
def suspend
Thread.critical = true
make_thread_list
for th in @thread_list
next if th[0] == Thread.current
context(th[0]).suspend
context(th[0]).set_suspend
end
Thread.critical = false
# Schedule other threads to suspend as soon as possible.
Thread.pass
end
def resume_all_thread
def resume
Thread.critical = true
make_thread_list
for th in @thread_list
next if th[0] == Thread.current
context(th[0]).clear_suspend
end
waiting.each do |th|
th.run
end

View file

@ -1316,15 +1316,19 @@ static VALUE
rb_str_replace_m(str, str2)
VALUE str, str2;
{
if (str == str2) return str;
if (TYPE(str2) != T_STRING) str2 = rb_str_to_str(str2);
rb_str_modify(str);
if (RSTRING(str2)->orig && FL_TEST(str2, STR_NO_ORIG)) {
if (RSTRING(str2)->orig && !FL_TEST(str2, STR_NO_ORIG)) {
if (str_independent(str))
free(RSTRING(str)->ptr);
RSTRING(str)->len = RSTRING(str2)->len;
RSTRING(str)->ptr = RSTRING(str2)->ptr;
RSTRING(str)->orig = RSTRING(str2)->orig;
}
else {
rb_str_modify(str);
rb_str_resize(str, RSTRING(str2)->len);
memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
}
@ -1490,8 +1494,8 @@ rb_str_inspect(str)
char c = *p++;
if (ismbchar(c) && p < pend) {
int len = mbclen(c);
rb_str_cat(result, p, len);
p += len;
rb_str_cat(result, p - 1, len);
p += len - 1;
}
else if (c == '"'|| c == '\\') {
s[0] = '\\'; s[1] = c;