From: Sebastian Hungerecker Date: 2007-05-08T15:04:29+09:00 Subject: Re: Difference answers from Terminal, TextMate, and BBEdit Greg wrote: > One question. How is > > > elsif (1..100).include?(user_input.to_i) > > working? I understand it up through "elsif(1..100)" Is the user_input > changed to integer before the elsif is evaluated. Yes. The to_i method is called on user_input, its result is passed as an argument to the include? methods of (1..100) and the result of that is used for the elsif. > What does the include? do? blubb.include?(bla) returns true if bla can be found inside blubb and false otherwise. In this case it returns true if user_input.to_i is inside the range 1..100, i.e. if it's a number between one and one hundred (inclusive). -- Ist so, weil ist so Bleibt so, weil war so