On 7/27/07, giles bowkett <[EMAIL PROTECTED]> wrote:
> eval(IO.read(init_path), binding, init_path)
>
> The question was, why use this idiom instead of load or require?
>
> My assumption is that the answer is this idiom gives you flexible
> bindings, but if anyone could verify that, or correct me, I'd totally
> appreciate it. I don't actually see the binding passed being declared
> anywhere, so it kind of puzzles me.

Giles,

You're on the right track with the binding. Evaling against the
current binding gives (int this case) your environment file access to
the "config" local. Check Kernel#binding in the Ruby core docs for a
bit more enlightenment.


~ j.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to