Hello, first post here...
Well I've just(today) started using Ruby, but it's not my first programming language...
When just playing a bit with the basics, and got a really weird problem, I can't get the if statements to work...
I have this code.
I run it and type in Rune, and i get this output:
name = gets()
if name == 'Rune' then
elsif name == 'Casper' then
puts 'it didn't work'
The variable does contain the right string, but it skips to the else code-block... I just can't seem to figure out what's wrong!
it didn't work
I've tried using the case statement, same thing happened, just skips to the else statement... (I've also tried the different syntaxes of the statements)
Please, can someone tell my what's wrong..?
Best regards Rune B