From: Noel Rappin Date: 2001-01-30T07:18:12+09:00 Subject: [ruby-talk:10101] Possible bug in RubyUnit? Or just my bug? I was having RubyUnit hang on assert_equal for some of my objects when the assertion fired. Further testing showed that it was hanging on the to_str calls in the method... def assert_equal(expected, actual, message="") setup_assert if expected != actual msg = edit_message(message) msg.concat "expected:<" msg.concat to_str(expected) msg.concat "> but was:<" msg.concat to_str(actual) msg.concat ">" raise_assertion_error(msg, 2) end end changing the method to make explicit to_s calls on expected and actual seems to have fixed my problem: def assert_equal(expected, actual, message="") setup_assert if expected != actual msg = edit_message(message) msg.concat "expected:<" msg.concat expected.to_s msg.concat "> but was:<" msg.concat actual.to_s msg.concat ">" raise_assertion_error(msg, 2) end end But my question is whether there is some bug in my class that would cause the hang from to_str? (At the time the class had no to_s method of its own defined). Does this change seem valid? Thanks, Noel ------------- Noel Rappin Openwave Principal Software Engineer, Internal Development Noel.Rappin@openwave.com ---------------- This message does not necessarily represent the views of Openwave Systems