Regarding r53642, how about we limit the symbols to just :r/:w/:rw?

Fewer ways to accomplish the same thing reduces cognitive overhead
for code reviewers; and smaller object size helps everyone.

--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -172,30 +172,12 @@ wait_mode_sym(VALUE mode)
     if (mode == ID2SYM(rb_intern("r"))) {
 	return RB_WAITFD_IN;
     }
-    if (mode == ID2SYM(rb_intern("read"))) {
-	return RB_WAITFD_IN;
-    }
-    if (mode == ID2SYM(rb_intern("readable"))) {
-	return RB_WAITFD_IN;
-    }
     if (mode == ID2SYM(rb_intern("w"))) {
 	return RB_WAITFD_OUT;
     }
-    if (mode == ID2SYM(rb_intern("write"))) {
-	return RB_WAITFD_OUT;
-    }
-    if (mode == ID2SYM(rb_intern("writable"))) {
-	return RB_WAITFD_OUT;
-    }
     if (mode == ID2SYM(rb_intern("rw"))) {
 	return RB_WAITFD_IN|RB_WAITFD_OUT;
     }
-    if (mode == ID2SYM(rb_intern("read_write"))) {
-	return RB_WAITFD_IN|RB_WAITFD_OUT;
-    }
-    if (mode == ID2SYM(rb_intern("readable_writable"))) {
-	return RB_WAITFD_IN|RB_WAITFD_OUT;
-    }
     rb_raise(rb_eArgError, "unsupported mode: %"PRIsVALUE, mode);
     return 0;
 }


I even prefer just supporting wait(:rw) since we already have
"wait_readable"/"wait_writable" methods, but :r and :w may make
sense for consistency.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>