vm_core.h: ruby_error_stream_closed

* vm_core.h (ruby_special_exceptions): renamed
  ruby_error_closed_stream as ruby_error_stream_closed, like the
  message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-04-09 02:34:49 +00:00
Родитель fd1462576c
Коммит 301143273a
2 изменённых файлов: 3 добавлений и 5 удалений

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

@ -101,8 +101,6 @@ static int rb_threadptr_pending_interrupt_empty_p(rb_thread_t *th);
#define eTerminateSignal INT2FIX(1)
static volatile int system_working = 1;
#define closed_stream_error GET_VM()->special_exceptions[ruby_error_closed_stream]
inline static void
st_delete_wrap(st_table *table, st_data_t key)
{
@ -2211,7 +2209,7 @@ rb_notify_fd_close(int fd)
busy = 0;
list_for_each(&vm->living_threads, th, vmlt_node) {
if (th->waiting_fd == fd) {
VALUE err = th->vm->special_exceptions[ruby_error_closed_stream];
VALUE err = th->vm->special_exceptions[ruby_error_stream_closed];
rb_threadptr_pending_interrupt_enque(th, err);
rb_threadptr_interrupt(th);
busy = 1;
@ -4883,7 +4881,7 @@ Init_Thread(void)
rb_define_method(rb_cThread, "name=", rb_thread_setname, 1);
rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0);
rb_vm_register_special_exception(ruby_error_closed_stream, rb_eIOError, "stream closed");
rb_vm_register_special_exception(ruby_error_stream_closed, rb_eIOError, "stream closed");
cThGroup = rb_define_class("ThreadGroup", rb_cObject);
rb_define_alloc_func(cThGroup, thgroup_s_alloc);

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

@ -426,7 +426,7 @@ enum ruby_special_exceptions {
ruby_error_reenter,
ruby_error_nomemory,
ruby_error_sysstack,
ruby_error_closed_stream,
ruby_error_stream_closed,
ruby_special_error_count
};