From: Yusuke ENDOH Date: 2010-10-05T23:32:55+09:00 Subject: [ruby-core:32697] Re: [Ruby 1.9-Feature#3845][Open] "in" infix operator Hi, 2010/9/29 Roger Pack : > I like it. �There's a kind of elegance in it > > if a in [1,2,3] > � �p ' it is in 1,2,3' > end > > It works well with my head. �+1 Thanks, but it is a bit different from my original suggestion. My suggestion does not require brackets: if a in 1,2,3 p 'it is in 1,2,3' end a in [1,2,3] is slightly verbose (for me) and inefficient because it creates new array object when evaluated. If you want to write array there, you can use splat operator: ary = [1,2,3] if a in *ary p 'it is in ary' end -- Yusuke Endoh