From: "Jan E." Date: 2012-09-03T20:47:44+09:00 Subject: Re: hwo to compare a number use in[a..b] Hi, Be careful not to mix up "=" (assignment) and "==". You can either use the logical "or": if A == 13 or A == 14 ... Or you can use Array#include: if [13, 14].include? A ... The latter doesn't really make sense here, but it's useful when you have a lot of values. In your specific case it might make more sense to put the error handling on top: raise ... unless A == 13 or A == 14 # do something -- Posted via http://www.ruby-forum.com/.