Hi,
I'm running Ruby 1.8.2 over WinXP-Pro/SP2.
I've written a variant of Dave Thomas' Decimal-to-Roman program from PickAxe 2. I get a couple of minor differences in execution..
One difference is that my assert statements that test values need a "to_s" to avoid failure. His do not, e.g.
assert_equal('i', Roman.new(1).to_s) assert_equal('ii', Roman.new(2).to_s) assert_equal('iv', Roman.new(4).to_s)
My statement assert_raise(RuntimeError, Roman.new(0)) shows up in the "errors" count and a traceback is produced. Dave's example shows no errors nor a traceback.
I test under SciTE and in a Command Window; they yield identical results.
Dave's book says he's covering the same Ruby version I'm using. Could it be he's developing on Uni* while I'm on Windows? The code's below if your interested.
Thanks in Advance, Richard
TestC.rb