On Fri, Feb 28, 2014 at 03:41:14PM +0100, Josef Reidinger wrote:

> I just would like to remind that noone should include/extend anything to 
> global namespace in his ruby code. It affects clients, modules, libs and also 
> includes. The most visible part is `include Yast` which cause that all 
> modules living in Yast namespace start living in global namespace and start 
> colliding with ruby classes and modules. But also other smaller modules can 
> cause problem.

Sadly Ruby uses the term include for something fundamentally
different to most other languages, most prominently C (and YCP).
No wonder mistakes like that happen.

Also see:

http://stackoverflow.com/questions/318144/what-is-the-difference-between-include-and-require-in-ruby

"Oddly enough, Ruby's require is analogous to C's include, while
Ruby's include is almost nothing like C's include."

http://ruby.about.com/b/2008/10/23/a-quick-peek-at-ruby-include-vs-require.htm

"This can be confusing as the include verb is used very
differently in other languages."

Regards,
  Arvin

-- 
To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: yast-devel+ow...@opensuse.org

Reply via email to