News for hackers. Stuff that matters.
Re:The Billy Baldwin of Conditional Assignment in Ruby by Argorak on Tuesday June 21, 2011 @03:20PM (#2680005)
There is a tiny inaccuracy in this post:

@value ||= "foo" is more efficient than

    @value = @value || "foo"
As it actually evaluates as follows:

    @value || @value = "foo"
This is especially good when working with hashes, as the left hand side is only evaluated once, not twice.
Re:The Billy Baldwin of Conditional Assignment in Ruby by laserlemon on Tuesday June 21, 2011 @03:31PM (#2680058)
Thank you for pointing this out. Addressed in the comments: http://collectiveidea.com/blog/archives/2011/06/21/the-billy...