From: Brian Candler Date: 2010-09-27T22:55:32+09:00 Subject: Re: error message, undefined method in Set Iain Barnett wrote: > Any help on this is much appreciated, as I've no idea what to try next. It is possible that there is another Set class defined somewhere. Try: puts Set.to_s # does this show "Set" or "Foo::Set" ? assert_equal Set, ::Set, "Using Set not at the top level!" Otherwise, you could copy your test file to another name, and keep trimming it until you get the smallest possible file which reproduces the problem, then post that file here. I don't recognise "test_construction(TestTask)" so I don't know what test framework you're using. Good ol' Test::Unit looks fine to me: require 'test/unit' require 'set' class TestSet < Test::Unit::TestCase def test_set set = Set.new assert_nothing_raised do set << 1 set << 2 end assert set.include?(2) assert !set.include?(3) end end Started . Finished in 0.000752 seconds. 1 tests, 3 assertions, 0 failures, 0 errors -- Posted via http://www.ruby-forum.com/.