Top "Monkeypatching" questions

Dynamically modifying run-time behavior by replacing program elements with new program elements

What does 'Monkey Patching' exactly Mean in Ruby?

According to Wikipedia, a monkey patch is: a way to extend or modify the runtime code of dynamic languages [...] without …

ruby terminology monkeypatching
Can I add custom methods/attributes to built-in Python types?

For example—say I want to add a helloWorld() method to Python's dict type. Can I do this? JavaScript has …

python custom-attributes monkeypatching built-in-types
In Rails, how to add a new method to String class?

I want to build an index for different objects in my Rails project and would like to add a 'count_…

ruby ruby-on-rails-3 monkeypatching
How to Mock an HTTP request in a unit testing scenario in Python

I would like to include a Web server for all my test related to HTTP. It doesn't need to be …

python unit-testing http mocking monkeypatching
Dynamically add a property or method to an object in groovy

Is it possible to add a property or a method to an object dynamically in Groovy? This is what I …

groovy monkeypatching
Can you monkey patch methods on core types in Python?

Ruby can add methods to the Number class and other core types to get effects like this: 1.should_equal(1) But …

python ruby programming-languages monkeypatching fluent-interface
Extending builtin classes in python

How can I extend a builtin class in python? I would like to add a method to the str class. …

python string monkeypatching
How can I modify the XMLHttpRequest responsetext received by another function?

I am trying to modify the responseText received by a function that I cannot modify. This function creates a XMLHttpRequest …

javascript ajax xmlhttprequest monkeypatching
Using Celery on processes and gevent in tasks at the same time

I'd like to use Celery as a queue for my tasks so my web app could enqueue a task, return …

python multiprocessing celery gevent monkeypatching
Is "monkey patching" really that bad?

Some languages like Ruby and JavaScript have open classes which allow you to modify interfaces of even core classes like …

javascript ruby oop language-design monkeypatching