Bugs found while writing specs

Version 5 (Arthur Schreiber, 05/15/2008 06:58 AM)

1 1
h1. Bugs found while writing specs
2 1
3 2 Vladimir Sizikov
h2. Our policy of dealing with bugs found in MRI
4 2 Vladimir Sizikov
5 2 Vladimir Sizikov
* Ruby-Core must be notified
6 2 Vladimir Sizikov
* Use #ruby_bug guard for the spec code that breaks due to MRI bug
7 2 Vladimir Sizikov
* Add the bug to this page below
8 2 Vladimir Sizikov
* MRI specific bug should be filed (optional, but highly desirable)
9 2 Vladimir Sizikov
10 1
h2. Bugs in the Complex library
11 1
12 3 Arthur Schreiber
h3. Incompatible changes to the Math module
13 3 Arthur Schreiber
14 1
Complex modifies the Math library in a way that breaks compatibility in many ways.
15 1
16 1
17 1
  Math.log("10") # => 2.30258509299405
18 1
  require "complex"
19 1
  Math.log("10") # => raises NoMethodError: undefined method `polar' for "10":String
20 1
21 1
22 5 Arthur Schreiber
Running the Math specs after the Complex specs, exposes a total of *50 errors/failures*.
23 1
24 1
25 1
bin/mspec -t r spec/ruby/1.8/library/complex/ spec/ruby/1.8/core/math/
26 1
27 1
...
28 1
29 5 Arthur Schreiber
77 files, 433 examples, 977 expectations, 33 failures, 17 errors
30 1
31 4 Arthur Schreiber
32 4 Arthur Schreiber
The following patch fixes these bugs: http://pastie.caboo.se/197522.txt