With a switch in the company I had been a little distant from coding and with my new ideakosh and journal initiatives I almost forgot that this is a technical blog after all. Never mind its been great time, and I am all geared up to flex some brain muscles with Flex2.0. I know 3.0 is out but my client wants 2.0. But before that here is an answer to a question that i asked long back …. I asked it because people asked me in interviews.

Diff b/w include and require in Ruby?
Michael Morin (The ruby guide of About .com) has been generous to answer me thru email. Here is the answer:

——————————————————-
The include and require methods do very different things.  The require method does what include does in most other languages, run another file.  It also tracks what you’re required in the past and won’t require the same file twice.  To run another file without this added functionality, you can use the load method.
The include method takes all the methods from another module and includes them into the current module.  This is a language-level thing as opposed to a file-level thing with require.  The include method is the primary way to “extend” classes with other modules (usually referred to as mix-ins).  For example, if my class defines the method “each”, I can include the mixin module Enumerable and it can act as a collection.  This can be confusing as the include verb is used very differently in other languages.
——————————————————-

Thanks Micheal, I think thats an excellent answer.