[LRUG] To debug the impossible bug

Matthew Rudy Jacobs matthewrudyjacobs at gmail.com
Wed Aug 3 04:26:09 PDT 2011


Yeah,
you're right Simon.

Apologies for taking us on a tangent.
But over the past 5 years I have NEVER seen this use of a case statement.

:s

Lets get back to solving your problem then.

On 3 August 2011 12:23, Simon Coffey <simon at tribesports.com> wrote:

> 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
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20110803/cc32a185/attachment.html>


More information about the Chat mailing list