Redundant require lib statements

Hi,

Let’s say in Model1 I require ‘net/http’, and in Model9 I also require
‘net/http’ because I forgot it was already required in Mode1, will that
cause a problem?

Should I redundantly require libs? Should I put require statements in a
common place? What’s the consensus on that?

Best regards,

On Nov 2, 1:59 pm, Fernando P. [email protected]
wrote:

Hi,

Let’s say in Model1 I require ‘net/http’, and in Model9 I also require
‘net/http’ because I forgot it was already required in Mode1, will that
cause a problem?

Nope. The second require will be ignored (note that ruby just looks at
the string you pass require - you could force it to load net/http a
second time by doing require ‘/usr/local/lib/ruby/1.8/net/
http’ (assuming that is where those files were on disk)).

Fred

Nope. The second require will be ignored (note that ruby just looks at
the string you pass require
Super! Thanks for the clarification.