Good point, I didn't catch that. If it was up to me I'd rather have `Float#round` always return `Float` as well for consistency. I could work on a patch for that too if you agree.Gat (Dawid Janczak)
BigDecimal#round returns Integer when no arguments are given and BigDecimal otherwise. I would have assumed the result to always be BigDecimal. BigDecimal.new('12.34').round # => 12 (Integer) BigDecimal.new('12.34').round(0) # => 12 ...Gat (Dawid Janczak)
First of all sorry for the late answer Andrew. Checking arity was one thing I was considering. You're right that the arity of the block might not match the number of items, but that works fine with arrays. ~~~ruby foo = [[1, 2], [...Gat (Dawid Janczak)
Let's say I have the following CSV file: col1,col2,col3 1,2,3 4,5,6 (...) I want to iterate over values yielding them to a block. I can do that like this: `CSV.foreach('file.csv') { |col1, col2, col3| print col2 + " " } # => "col...Gat (Dawid Janczak)