From: Peter Hickman Date: 2012-11-27T23:32:52+09:00 Subject: Re: error in if --e89a8ff1cb06b253b404cf7aeccd Content-Type: text/plain; charset=ISO-8859-1 There is no such construction in Ruby (were you thinking about another language?) try something like a = [1,2,3] if a.include?(1) puts "exists" end On 27 November 2012 14:22, Mohammed Yasin Rahman < Mohammed-Yasin.Rahman@lip6.fr> wrote: > WHat's the error here? > > a = [1,2,3] > > if 1 in a > puts "exists" > end > > It gives: test.rb:5: syntax error, unexpected keyword_end, expecting $end > > --e89a8ff1cb06b253b404cf7aeccd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable There is no such construction in Ruby (were you thinking about another lang= uage?) try something like

a =3D [1,2,3]

if a.include?(1)
=A0 puts "exists"
e= nd



On 27 November 2012 14:22, Mohammed Yasin Rahman <Mohammed-Y= asin.Rahman@lip6.fr> wrote:
WHat's the error here?

a =3D [1,2,3]

if 1 in a
=A0 =A0 puts "exists"
end

It gives: test.rb:5: syntax error, unexpected keyword_end, expecting $end

--e89a8ff1cb06b253b404cf7aeccd--