Answer Posted / Kirti Singh
A Ruby block can be defined in two main ways: 1) using curly braces ({}), and 2) by indenting the code under a method or loop. However, it's important to note that a block is not executed on its own but is passed as an argument to the method or loop that calls it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers