What is the use of load and require in ruby?
Answer / 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 |
Explain about methods?
What are blocks and procs?
What are Ruby arrays and how they can be created?
Tell me what is the difference between active support's “hashwithindifferent” and ruby's “hash” ?
Are numeric objects mutable in ruby?
Explain class libraries in ruby.
What is ruby?
what is the role of sub-directory app/controllers and app/helpers?
What function converts all html special symbols to html entities in ruby?
What are the ruby variables?
Explain about interpolation?
What are the object-oriented programming features supported by ruby?