General

Profile

Gat (Dawid Janczak)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

11/04/2016

07:31 AM Ruby Bug #12780: BigDecimal#round returns different types depending on argument
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)

09/21/2016

10:47 AM Ruby Bug #12780 (Closed): BigDecimal#round returns different types depending on argument
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)

07/28/2014

02:32 PM Ruby Bug #10013: [CSV] Yielding all elements from a row
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)

07/07/2014

01:05 PM Ruby Bug #10013: [CSV] Yielding all elements from a row
Sorry, this should be in lib category, but I'm not able to change it now. Gat (Dawid Janczak)
01:03 PM Ruby Bug #10013 (Closed): [CSV] Yielding all elements from a row
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)

Also available in: Atom