From: Tomasz Wegrzanowski Date: 2006-09-05T09:23:27+09:00 Subject: Re: Kernel.=== in case statements, even though I never called it On 9/5/06, Jesse Silliman wrote: > I was profiling a script I wrote, and the method with the greatest > amount of time used was Kernel.=== . I was surprised, not only since I > didn't use this method in my code, but my code had nothing involving > modules. When I changed a case statement that was inside my loop to an > if and many elsifs, I saved about 2 seconds on profiling, and the call > was gone. Is there a reason such a slow call is used in case statements? case uses === (pattern match) not ==. It is very useful: case str when /foo/ ... end case num when 3..5 ... end -- Tomasz Wegrzanowski [ http://t-a-w.blogspot.com/ ]