From: Max Lapshin Date: 2007-01-13T04:46:14+09:00 Subject: Re: Why doesn't Ruby allow for overloaded methods within a c Wes Gamble wrote: > > Thanks, I hadn't considered that. > > Wes Think about this: class Foo def methodname(Foo a) puts a.value end def methodname(String a) puts "bar: "+a end end class FooTest < Test::Unit::TestCase def test_methodname @mock_foo = "some mock string value" def @mock_foo.value self end @foo = Foo.new assert_equal "some mock string value", @foo.methodname(@mock_foo) end end Problems =) -- Posted via http://www.ruby-forum.com/.