tfpt review "/shelveset:num;REDMOND\sborde" Comment : Fixnum + Bignum should yield a Bignum, not a Float. This was causing complex/denominator_spec to fail as Bignum was monkey-patched and not Float. A different return type affects whether the monkey-patched method is visible or not. Also changed fixnum/plus_spec to check for the result type. BigDecimal coercing works a bit differently. So added a protocol for that. Small change to the MSpec eql guard to show the type of actual and expected values since the inspect string itself can be identical. Tomas, I had added tests for Enumerable#each_cons each_slice. Let me know if you want to grab them since you are working on the fix. Else, I can check it in with tags (will need to move it from library/enumerator to core/enumerable). -------------- next part -------------- A non-text attachment was scrubbed... Name: num.diff Type: application/octet-stream Size: 54118 bytes Desc: num.diff URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090226/e5bd4aa6/attachment-0001.obj>
Looks good. Tomas -----Original Message----- From: Shri Borde Sent: Thursday, February 26, 2009 11:55 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: numeric types tfpt review "/shelveset:num;REDMOND\sborde" Comment : Fixnum + Bignum should yield a Bignum, not a Float. This was causing complex/denominator_spec to fail as Bignum was monkey-patched and not Float. A different return type affects whether the monkey-patched method is visible or not. Also changed fixnum/plus_spec to check for the result type. BigDecimal coercing works a bit differently. So added a protocol for that. Small change to the MSpec eql guard to show the type of actual and expected values since the inspect string itself can be identical. Tomas, I had added tests for Enumerable#each_cons each_slice. Let me know if you want to grab them since you are working on the fix. Else, I can check it in with tags (will need to move it from library/enumerator to core/enumerable).