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/trunk@871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-08-02 09:50:37 +00:00
parent 6689997b5e
commit d65b573aea
3 changed files with 12 additions and 8 deletions

View file

@ -1,3 +1,10 @@
Wed Aug 2 18:27:47 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_thread_wait_fd): prohibit thread context switch
during compilation.
* eval.c (rb_cont_call): prohibit Continuation#call across threads.
Wed Aug 2 08:22:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp> Wed Aug 2 08:22:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* gc.c (rb_gc): clear malloc_memories to zero, to avoid potential * gc.c (rb_gc): clear malloc_memories to zero, to avoid potential

9
eval.c
View file

@ -478,6 +478,8 @@ rb_attr(klass, id, read, write, ex)
} }
} }
extern int ruby_in_compile;
VALUE ruby_errinfo = Qnil; VALUE ruby_errinfo = Qnil;
extern NODE *ruby_eval_tree_begin; extern NODE *ruby_eval_tree_begin;
extern NODE *ruby_eval_tree; extern NODE *ruby_eval_tree;
@ -6892,7 +6894,6 @@ find_bad_fds(dst, src, max)
void void
rb_thread_schedule() rb_thread_schedule()
{ {
extern int ruby_in_compile;
rb_thread_t next; /* OK */ rb_thread_t next; /* OK */
rb_thread_t th; rb_thread_t th;
rb_thread_t curr; rb_thread_t curr;
@ -6906,11 +6907,6 @@ rb_thread_schedule()
int n, max; int n, max;
int need_select = 0; int need_select = 0;
if (ruby_in_compile) {
printf("switch during compilation.\n");
abort();
}
rb_thread_pending = 0; rb_thread_pending = 0;
if (curr_thread == curr_thread->next if (curr_thread == curr_thread->next
&& curr_thread->status == THREAD_RUNNABLE) && curr_thread->status == THREAD_RUNNABLE)
@ -7093,6 +7089,7 @@ rb_thread_wait_fd(fd)
int fd; int fd;
{ {
if (curr_thread == curr_thread->next) return; if (curr_thread == curr_thread->next) return;
if (ruby_in_compile) return;
curr_thread->status = THREAD_STOPPED; curr_thread->status = THREAD_STOPPED;
curr_thread->fd = fd; curr_thread->fd = fd;

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.5.5" #define RUBY_VERSION "1.5.5"
#define RUBY_RELEASE_DATE "2000-08-01" #define RUBY_RELEASE_DATE "2000-08-02"
#define RUBY_VERSION_CODE 155 #define RUBY_VERSION_CODE 155
#define RUBY_RELEASE_CODE 20000801 #define RUBY_RELEASE_CODE 20000802