These are chat archives for dry-rb/chat

22nd
Sep 2017
Rafael George
@cored
Sep 22 2017 13:56
ArgumentError: invalid value for Integer(): "" shouldn't that be coercible to 0
?
why am I getting that error with Types::Coercible::Int.default(0)
"".to_i == 0
Jo-Herman Haugholt
@huyderman
Sep 22 2017 13:57
Coercible calls Integer("") not "".to_i
Nikita Shilnikov
@flash-gordon
Sep 22 2017 14:00
right
IMO to_i shouldn’t work as it does
Jo-Herman Haugholt
@huyderman
Sep 22 2017 14:01
Yeah, it can lead to surprising results
Rafael George
@cored
Sep 22 2017 14:01
interesting
so I shouldn't be passing "" to a Integer("")
I removed the coercible call