Ruby on this site has strange behavior?
Is it just me or when running a lot of ruby code on this website, the code doesn't behave the same way as on my IRB or if I execute the code locally?
This is the third time it happens, but I am currently working on Letter Changes - my code which works fine on my machine when executed on this site, returns a NIL. Is my code just wrong or what is happening??
i = 0
result = ""
while i < str.length
if str[i].ord > 96 && str[i].ord < 123
loc = str[i].ord
loc += 1
loc = loc.chr
result += loc
result += str[i]
i += 1
posted this question on 11/24/15 |