Skip to content

Commit be83b8b

Browse files
author
matz
committed
990611
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent ecfa852 commit be83b8b

File tree

23 files changed

+90
-54
lines changed

23 files changed

+90
-54
lines changed

ChangeLog

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
Fri Jun 10 13:42:10 1999 Koji Arai <JCA02266@nifty.ne.jp>
2+
3+
* pack.c (pack_pack): template `Z' should be allowed.
4+
5+
Fri Jun 11 15:21:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
6+
7+
* ext/etc/etc.c (etc_group): dumps core if there's no more group.
8+
9+
Fri Jun 11 01:50:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
10+
11+
* eval.c (ruby_run): Init_stack() was called too late; local
12+
variables happend to be higher (or lower) than stack_start.
13+
14+
Thu Jun 10 16:41:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
15+
16+
* io.c: do not call `initialize' for IO objects. So with Array,
17+
Hash, Range, and Time objects.
18+
19+
* ext/curses/curses.c (curses_getch): made thread aware using
20+
rb_read_check().
21+
22+
* ext/curses/curses.c (window_getch): ditto.
23+
24+
* ext/curses/curses.c (curses_getstr): made (partially) thread
25+
aware using rb_read_check().
26+
27+
* ext/curses/curses.c (window_getstr): ditto.
28+
29+
* io.c (rb_read_check): new function to help making something
30+
(like extension libraries) thread aware.
31+
32+
* eval.c (is_defined): `defined? super' should be true even for
33+
private superclass methods.
34+
135
Wed Jun 9 13:26:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
236

337
* eval.c (rb_thread_loading): modified to avoid nested race
@@ -6,7 +40,8 @@ Wed Jun 9 13:26:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
640
* ext/tcltklib/tcltklib.c (ip_invoke): queue invocation on non
741
main threads.
842

9-
* ext/tcltklib/tcltklib.c (lib_mainloop): flush invoke queues.
43+
* ext/tcltklib/tcltklib.c (lib_mainloop): flush invocation
44+
queues periodically.
1045

1146
* version.c (ruby_show_version): now print the message to stdout.
1247

@@ -105,7 +140,7 @@ Sat May 29 18:27:13 1999 Koji Arai <JCA02266@nifty.ne.jp>
105140
Sat May 29 12:27:00 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
106141

107142
* ext/tcltklib/tcltklib.c (ip_invoke): proper ref count management
108-
to avoid leak.
143+
to avoid leak. I HATE REF COUNTING!!
109144

110145
* eval.c (ruby_run): moved ruby_require_libraries() to handle `-r'
111146
from ruby_options() to avoid stack corruption for threads

ToDo

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,26 @@ Hacking Interpreter
1818

1919
Standard Libraries
2020

21+
* IO/File to call initialize
2122
* String#scanf(?)
2223
* Object#fmt(?)
2324
* Integer[num], Float[num] (String[str]?, Array[obj]??)
2425
* Stream or Port, abstract superclass of IO.
2526

2627
Extension Libraries
2728

28-
* mod_ruby, FastCGI ruby
29-
* InterBase module
29+
* FastCGI ruby
3030
* ptk.rb pTk wrapper that is compatible to tk.rb
3131

3232
Ruby Libraries
3333

34-
* CGI.rb
3534
* httplib.rb, urllib.rb, nttplib.rb, etc.
3635
* format like perl's
3736

3837
Tools
3938

4039
* extension library maker like XS or SWIG
4140
* freeze or undump to bundle everything
42-
* eruby - embedded ruby
4341

4442
Misc
4543

array.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ rb_ary_s_new(argc, argv, klass)
194194
ary->ptr = ALLOC_N(VALUE, ary->capa);
195195
memfill(ary->ptr, len, val);
196196
ary->len = len;
197-
rb_obj_call_init((VALUE)ary, argc, argv);
198197

199198
return (VALUE)ary;
200199
}

config.guess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ EOF
382382
case "${UNAME_MACHINE}" in
383383
9000/31? ) HP_ARCH=m68000 ;;
384384
9000/[34]?? ) HP_ARCH=m68k ;;
385-
9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 )
385+
9000/[678]?? )
386386
sed 's/^ //' << EOF >dummy.c
387387
#include <stdlib.h>
388388
#include <unistd.h>

eval.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ rb_method_boundp(klass, id, ex)
321321
int noex;
322322

323323
if (rb_get_method_body(&klass, &id, &noex)) {
324-
if (ex && noex & NOEX_PRIVATE)
324+
if (ex && (noex & NOEX_PRIVATE))
325325
return Qfalse;
326326
return Qtrue;
327327
}
@@ -879,7 +879,7 @@ extern char **environ;
879879
char **rb_origenviron;
880880

881881
void rb_call_inits _((void));
882-
void Init_stack _((void));
882+
void Init_stack _((void*));
883883
void Init_heap _((void));
884884
void Init_ext _((void));
885885

@@ -899,6 +899,7 @@ ruby_init()
899899
rb_origenviron = environ;
900900
#endif
901901

902+
Init_stack(0);
902903
Init_heap();
903904
PUSH_SCOPE();
904905
ruby_scope->local_vars = 0;
@@ -978,16 +979,14 @@ ruby_run()
978979
{
979980
int state;
980981
static int ex;
982+
NODE *save;
981983

982984
if (ruby_nerrs > 0) exit(ruby_nerrs);
983985

984-
Init_stack();
985-
986+
Init_stack(&save);
986987
PUSH_TAG(PROT_NONE);
987988
PUSH_ITER(ITER_NOT);
988989
if ((state = EXEC_TAG()) == 0) {
989-
NODE *save;
990-
991990
if (!ext_init) Init_ext();
992991
save = ruby_eval_tree;
993992
ruby_require_libraries();
@@ -1464,7 +1463,7 @@ is_defined(self, node, buf)
14641463
case NODE_ZSUPER:
14651464
if (ruby_frame->last_func == 0) return 0;
14661465
else if (rb_method_boundp(RCLASS(ruby_frame->last_class)->super,
1467-
ruby_frame->last_func, 1)) {
1466+
ruby_frame->last_func, 0)) {
14681467
if (nd_type(node) == NODE_SUPER) {
14691468
return arg_defined(self, node->nd_args, buf, "super");
14701469
}
@@ -2739,7 +2738,6 @@ rb_eval(self, node)
27392738
klass = rb_define_class_id(node->nd_cname, super);
27402739
rb_const_set(ruby_class, node->nd_cname, klass);
27412740
rb_set_class_path(klass,ruby_class,rb_id2name(node->nd_cname));
2742-
rb_obj_call_init(klass, 0, 0);
27432741
}
27442742
if (ruby_wrapper) {
27452743
rb_extend_object(klass, ruby_wrapper);
@@ -2779,7 +2777,6 @@ rb_eval(self, node)
27792777
module = rb_define_module_id(node->nd_cname);
27802778
rb_const_set(ruby_class, node->nd_cname, module);
27812779
rb_set_class_path(module,ruby_class,rb_id2name(node->nd_cname));
2782-
rb_obj_call_init(module, 0, 0);
27832780
}
27842781
if (ruby_wrapper) {
27852782
rb_extend_object(module, ruby_wrapper);
@@ -5425,7 +5422,6 @@ proc_s_new(klass)
54255422

54265423
scope_dup(data->scope);
54275424
proc_save_safe_level(proc);
5428-
rb_obj_call_init(proc, 0, 0);
54295425

54305426
return proc;
54315427
}

ext/curses/curses.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
#endif
3333
#endif
3434

35+
#include "stdio.h"
3536
#include "ruby.h"
37+
#include "rubyio.h"
3638

3739
static VALUE mCurses;
3840
static VALUE cWindow;
@@ -355,6 +357,7 @@ static VALUE
355357
curses_getch(obj)
356358
VALUE obj;
357359
{
360+
rb_read_check(stdin);
358361
return CHR2FIX(getch());
359362
}
360363

@@ -364,6 +367,8 @@ curses_getstr(obj)
364367
VALUE obj;
365368
{
366369
char rtn[1024]; /* This should be big enough.. I hope */
370+
371+
rb_read_check(stdin);
367372
getstr(rtn);
368373
return rb_tainted_str_new2(rtn);
369374
}
@@ -730,6 +735,7 @@ window_getch(obj)
730735
{
731736
struct windata *winp;
732737

738+
rb_read_check(stdin);
733739
GetWINDOW(obj, winp);
734740
return CHR2FIX(wgetch(winp->window));
735741
}
@@ -743,6 +749,7 @@ window_getstr(obj)
743749
char rtn[1024]; /* This should be big enough.. I hope */
744750

745751
GetWINDOW(obj, winp);
752+
rb_read_check(stdin);
746753
wgetstr(winp->window, rtn);
747754
return rb_tainted_str_new2(rtn);
748755
}

ext/etc/etc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,11 @@ etc_group(obj)
214214
endgrent();
215215
return obj;
216216
}
217-
return setup_group(getgrent());
218-
#else
219-
return Qnil;
217+
if (grp = getgrent()) {
218+
return setup_group(grp);
219+
}
220220
#endif
221+
return Qnil;
221222
}
222223

223224
static VALUE mEtc;

ext/pty/pty.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,10 @@ pty_getpty(self, shell)
442442
rfptr->mode = rb_io_mode_flags("r");
443443
rfptr->f = fdopen(info.fd, "r");
444444
rfptr->path = strdup(RSTRING(shell)->ptr);
445-
rb_obj_call_init((VALUE)rport, 1, &shell);
446445

447446
wfptr->mode = rb_io_mode_flags("w");
448447
wfptr->f = fdopen(dup(info.fd), "w");
449448
wfptr->path = strdup(RSTRING(shell)->ptr);
450-
rb_obj_call_init((VALUE)wport, 1, &shell);
451449

452450
res = rb_ary_new2(2);
453451
rb_ary_store(res,0,(VALUE)rport);

ext/sdbm/init.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ fsdbm_s_open(argc, argv, klass)
8585
obj = Data_Make_Struct(klass,struct dbmdata,0,free_sdbm,dbmp);
8686
dbmp->di_dbm = dbm;
8787
dbmp->di_size = -1;
88-
rb_obj_call_init(obj, argc, argv);
8988

9089
return obj;
9190
}

ext/socket/socket.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ sock_new(class, fd)
114114
fp->f2 = rb_fdopen(fd, "w");
115115
fp->mode = FMODE_READWRITE;
116116
rb_io_unbuffered(fp);
117-
rb_obj_call_init((VALUE)sock, 0, 0);
118117

119118
return (VALUE)sock;
120119
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy