[LRUG] To debug the impossible bug
Simon Coffey
simon at tribesports.com
Wed Aug 3 04:23:53 PDT 2011
On 3 August 2011 12:05, Matthew Rudy Jacobs <matthewrudyjacobs at gmail.com> wrote:
> Hi Simon.
> In your code snippet I want you to think about what it means.
As Tom has pointed out, it's my understanding (and the Pickaxe's) that
this pattern does indeed execute as if it were a series of if
statements. And indeed the vast majority of the time, it works
perfectly - as I said in my original email, this error occurs perhaps
once a week, if that, and the method is called for every page render
on our site. If the code:
case
when nil then nil.crash
end
reliably caused a :crash message to be sent to nil, our code would
never work, surely?
Cheers,
Simon
More information about the Chat
mailing list