RubyFlow The Ruby and Rails community linklog

Unpatched is a convenience library, like...

Unpatched is a convenience library, like ActiveSupport or extlib, but without a single monkey-patch. It is also an API experiment.

Comments

I offer to your attention a film about six priorities of the generalized instruments of management by countries and people of Earth. Six Principles of Global Manipulation Anti-Qur’an Strategy of the Bible Project Wheeler-Dealers

“But methods without one will always return magically enhanced objects. Since you never want to pass those on (otherwise, what’s the point?)”

The point is not reopening core classes to add methods to every instance of that class. There is no problem with “magically enhanced” objects (other than calling them that - please for gods sake just call them extended objects), nor with passing them on. Extending an object, or creating a new type of one is TOTALLY differrent than reopening a class.
There is nothing wrong with working with either of these object, and they both prevent the reopening of Array to add a bunch of stats specific methods: StatsArray.new([1,2,3]).std_dev [1,2,3].extend(StatsArray),std_dev

If it’s not obvious, I think the project would seem a lot better with that line of the README axed or rewritten.

@Tim Connor: In a perfect world, yes, but it fails miserably as soon as you have some code where it is important to have the correct object at hand, like if you pass the object to nearly any c-extension out there or if you wrap a proc, for instance, and what to rebind it. Also, you have to be careful with overriding or implementing methods all of a sudden, like, take to_json for instance.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in