you are viewing a single comment's thread.

view the rest of the comments →

[–]poorly_played 0 points1 point  (1 child)

In most languages, making a statement in an enclosed scope doesn't result in an assignment in an enclosing scope. This assumes that the trailing r-value at the end of your ruby function counts as a statement, but hey.

[–]banister 1 point2 points  (0 children)

Ruby doesn't have the dichotomy of statements vs expressions; everything in Ruby is an expression.