diff options
| -rw-r--r-- | thread_sync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thread_sync.c b/thread_sync.c index 30f3315b0c..962ca13d2a 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -839,13 +839,13 @@ ary_buf_new(void) return rb_ary_hidden_new(1); } -static VALUE +static inline VALUE check_array(VALUE obj, VALUE ary) { - if (!RB_TYPE_P(ary, T_ARRAY)) { - rb_raise(rb_eTypeError, "%+"PRIsVALUE" not initialized", obj); + if (RB_LIKELY(ary)) { + return ary; } - return ary; + rb_raise(rb_eTypeError, "%+"PRIsVALUE" not initialized", obj); } static long |
