Chaz Meyers (cpm) wrote,
Chaz Meyers

Note to self: precidence matters!

Note to self:

variable = A and B ? some_method_returning_array() : []

`variable` is always set to `A` because `and` does not bind as tightly as `&&`! Oops!

I definitely did not spend an hour not realizing this. Not at all. :)
Tags: computers, nerdcore, ruby, you wish you were as cool as me

  • My tweets

    Mon, 08:57: RT @ thomdunn: New inspiration just dropped

  • My tweets

    Fri, 23:43: RT @ TheParkerJam: Have any fellow EST @ Fusion fans been following this year? Between new time zone and the gaps between games, I…

  • My tweets

    Fri, 10:53: RT @ TheParkerJam: I can now say I'm in an Among Us YouTube video that has features Kimi, Ellum, and Chilled. 🤯(OK, it's a…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.