DEV Community

Discussion on: Smooth Ruby One-Liners

Collapse
 
rpalo profile image
Ryan Palo

Thanks! I think I've got most everything updated. That input-output redirect is especially good to know.

I left the F.first and F.last because I think they're a bit easier to read, and it's possibly a bit more idiomatic Ruby to use methods when they're available (like using item.zero? instead of item == 0). If you wanted the second item, $F[1] would be fair though.

Anyways, thanks for helping me make my post better, I really appreciate it!