# Is there an "in" operator in ruby?

**URL:** <https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/94067>\
**Category:** Ruby\
**Created:** [April 19, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/94067 "2006-04-19T21:09:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 19, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/94067/1 "2006-04-19T21:09:11Z")

</div>

@test=[2,4,6,8]

(@test & (1…10).to\_a).each { |x| … }

T.
