@@ -146,7 +146,7 @@ io_ready_p(VALUE io)
146
146
#endif
147
147
}
148
148
149
- // Ruby 3.2+ can define these methods. This macro indicates that case.
149
+ /* Ruby 3.2+ can define these methods. This macro indicates that case. */
150
150
#ifndef RUBY_IO_WAIT_METHODS
151
151
152
152
/*
@@ -351,18 +351,18 @@ io_wait(int argc, VALUE *argv, VALUE io)
351
351
#else
352
352
VALUE timeout = Qundef ;
353
353
rb_io_event_t events = 0 ;
354
- int return_io = 0 ;
354
+ int i , return_io = 0 ;
355
355
356
- // The documented signature for this method is actually incorrect.
357
- // A single timeout is allowed in any position, and multiple symbols can be given.
358
- // Whether this is intentional or not, I don't know, and as such I consider this to
359
- // be a legacy/slow path.
356
+ /* The documented signature for this method is actually incorrect.
357
+ * A single timeout is allowed in any position, and multiple symbols can be given.
358
+ * Whether this is intentional or not, I don't know, and as such I consider this to
359
+ * be a legacy/slow path. */
360
360
if (argc != 2 || (RB_SYMBOL_P (argv [0 ]) || RB_SYMBOL_P (argv [1 ]))) {
361
- // We'd prefer to return the actual mask, but this form would return the io itself:
361
+ /* We'd prefer to return the actual mask, but this form would return the io itself: */
362
362
return_io = 1 ;
363
363
364
- // Slow/messy path:
365
- for (int i = 0 ; i < argc ; i += 1 ) {
364
+ /* Slow/messy path: */
365
+ for (i = 0 ; i < argc ; i += 1 ) {
366
366
if (RB_SYMBOL_P (argv [i ])) {
367
367
events |= wait_mode_sym (argv [i ]);
368
368
}
@@ -381,7 +381,7 @@ io_wait(int argc, VALUE *argv, VALUE io)
381
381
}
382
382
}
383
383
else /* argc == 2 and neither are symbols */ {
384
- // This is the fast path:
384
+ /* This is the fast path: */
385
385
events = io_event_from_value (argv [0 ]);
386
386
timeout = argv [1 ];
387
387
}
@@ -391,9 +391,9 @@ io_wait(int argc, VALUE *argv, VALUE io)
391
391
RB_IO_POINTER (io , fptr );
392
392
393
393
if (rb_io_read_pending (fptr )) {
394
- // This was the original behaviour:
394
+ /* This was the original behaviour: */
395
395
if (return_io ) return Qtrue ;
396
- // New behaviour always returns an event mask:
396
+ /* New behaviour always returns an event mask: */
397
397
else return RB_INT2NUM (RUBY_IO_READABLE );
398
398
}
399
399
}
0 commit comments