L
Luis Mcdoguall
Hi,
I am new to Ruby(v 1.8.6),
I will like to know if is possible to
use multiple lines on a block for the each_byte method on strings.
Something like:
coset=9
i=0
message =
"adsfasdfakjhkjhowerjkbvmzbcnvkfhoeiwrukfhzadsfhhfalkhweryiuwyoyqbvbv"
message.each_byte do |letter|
i=+1
if i == coset
puts
else
print letter
end
end
this code will yield : syntax error, unexpected $end, expecting kEND
Any explanation will be appreciated.
Thanks
-L
I am new to Ruby(v 1.8.6),
I will like to know if is possible to
use multiple lines on a block for the each_byte method on strings.
Something like:
coset=9
i=0
message =
"adsfasdfakjhkjhowerjkbvmzbcnvkfhoeiwrukfhzadsfhhfalkhweryiuwyoyqbvbv"
message.each_byte do |letter|
i=+1
if i == coset
puts
else
print letter
end
end
this code will yield : syntax error, unexpected $end, expecting kEND
Any explanation will be appreciated.
Thanks
-L