Community Page
- avdi.org/devblog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- FKING WESTERN UNION!!!!!!!!!!!!!!!!!!!!!!!!!! I HATE IT!!!!!!!!!!!!!!!!!!!!!!!!!!! IM HAVING THE SAME DARN PROBLEM!! CAN'T LOG IN!!!
- I'm very sad I missed Barcamp (and it would have been great to catch up with you, as well). Hopefully I'll be at the next one. At any rate, I did have a great day-before-father's-day...
- Good insight. A lot of social gatherings like Green Drinks seem to be a majority female. Cross pollination between Greens and Geeks might be a good thing.
- Wow, the hackerspace thing is so rad. I wish there was one in the Harrisburg area.
- Yeah, I overstated, as is my wont. I guess the real issue I have is that the practices are already starting to read a tiny bit like a "Java list". Java was all about taking away all the...
Jump to original thread »
Sure, monkey patching is great and all. That period of disbelief, followed by increasing exasperation as the victim maintenance programmer discovers that an object is behaving differently than it’s source code says it should, is satisfying. But sooner or later he or she wises
... Continue reading »
1 year ago
1 year ago
LOOK AT THE DATE MAN!!!!!!!!!!
1 year ago
I think whenever someone mentions monkey patching from now on, I will refer to ninja patching. Sounds a lot better.
1 year ago
I personally favor "slapmethoding", which is entry #3 in _why's Complete List Of Substitute Names For The Maneuver We Now Know To Be Monkeypatching.
http://hackety.org/2007/08/10/myCompleteListOfS...
1 year ago
1 year ago
Thread.new do
while(Module.constants.grep(/Ninja/).empty?)
sleep(1)
end
Ninja.class_eval do
private
def attack!
# Ahah! The ninja is helpless!
end
end
end
end
My apologies, I'm still new to Ruby so I'm sure this could be nicer. I couldn't figure out a decent way to determine if a class is defined (it must be staring me right in the face), and the thread was the only way I could get it to work regardless of the require ordering.
Needless to say I enjoyed this post!
One other thing: I lost my comment the first time I submitted because I was prompted about OpenID. I am not a fan of that behaviour :/
1 year ago
1 year ago
I had to laugh out loud while trying it out and understanding it!
"Objects, silence! Beware of the Ninja!"
4 months ago
4 months ago