3 ms·
# randomly placed in an initialization file Object.class_eval do def to_s "a" end end # in some other context perhaps a controller
by taf2 13y ago
# randomly placed in an initialization file
Object.class_eval do
def to_s
"a"
end
end
# in some other context perhaps a controller action...
def lookup_user
user = User.find_by_name(params[:name].to_s)
if user.blank?
flash[:error] = "No user found by that name"
redirect_to "/users"
return
end
# good stuff goes here
end
#
# try debugging it... it's tricky... use grep?
#
the thing is this is actually not too bad... in C++ try debugging a memory leak...
(formatting...)
- pjmlp 13y ago> C++ try debugging a memory leak... On a codebase writen by a team scattered around the globe, with the customer shouting on technical support and on site support team to know when the fix is ready. I like C++, but I don't miss manual memory management.