Zhu Wu's Blog

The world is a fine place and worth fighting for.

Debugging Ruby Methods at Runtime

Due to the dynamic nature of Ruby, it is hard to locate a method definition statically. Thus, we can only find the method definition accurately at runtime. Here are some tips.

Suppose we have an object called foo. We can use foo.methods to find...

Continue reading →

Require Files From Gem's Spec Folder

As a ruby programmer, you probably already know that the code files in gem's lib folder are automatically loaded into $LOAD_PATH when you require the gem.

Today, I encountered a scenario that I have to manually load source code files from spec...

Continue reading →