Answer Posted / Ankush Arora
Both load and require are used to include Ruby files, but they behave slightly differently. require compiles the file only if it's not already compiled (a .rbc file). On the other hand, load will always execute the code, even if it's already compiled. The main difference is that require prevents duplicate loading, while load does not.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers