-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A: It makes it difficult to follow the conversation
!: Why is top posting bad?

Zoop Zoop wrote:
| Robert, could you explain a bit more what you mean?

He means that you can crack open Ruby's classes when ever you want.

Adding a 'class String;end' definition anywhere in your code opens up
String, and adds your method. This is called Monkeypatching, and you'll
get fun results if several people get the same idea, and all of them
monkeypatch String.

| Do you mean adding the code directly to the original string.rb file?

No. Any source file in your application / directory structure. as long
as require can find it, you can use it.

| Are there other solutions?

Extend String with your method.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

Rule of Open-Source Programming #33:

Don't waste time on writing test cases and test scripts - your users are
your best testers.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkghWb8ACgkQbtAgaoJTgL8/EACfWzCD+XIRv4vpi6jp+LCx0RtT
mekAn2+GgDPWY6Nmyo886U01O+h2cQCu
=asV0
-----END PGP SIGNATURE-----