From: Doug Glidden <41mortimer@...> Date: 2008-08-27T23:24:23+09:00 Subject: Re: assert_raise question [snip] > ### Begin test.rb ### > require 'test/unit' > class TestRaise < Test::Unit::TestCase > def test_raise > assert_raise(ArgumentError){raise ArgumentError.new("basic argument > issue")} > end > def test_raise_parent > assert_raise(StandardError){raise ArgumentError.new("basic argument > issue")} > end > end > ### End test.rb ### [snip] This is a somewhat unrelated question, but in playing around with this, I discovered something odd. The test_raise method above works, but the following modification of it does not: def test_raise assert_raise ArgumentError {raise ArgumentError.new("basic argument issue")} end Now there's suddenly an Exception: undefined method 'ArgumentError'... I was more than a little surprised to discover that the parens make a difference here? Can anyone explain to me _why_ there's a difference? Doug -- Posted via http://www.ruby-forum.com/.