0
Can we use two line of code in a single line in Ruby?
In languages like java if we write code after ; it is considered as a new line. Can we write two line of codes in a single line with space? Or is there any other way out for the same? Where exactly does Ruby take the end of line for a code?
2 ответов
+ 1
Why didn't you try?
I tried:
puts "1"; puts "2"
and it worked.