From: Alex Wayne Date: 2008-03-21T06:56:48+09:00 Subject: Delcaring a foo[] method I am trying to define a method that you call like this: @obj.foo[123] I thought I knew how to do this. I tried to setup the method like so: def foo[](value) value * 2 end But this gives me a syntax error right at that first brace. I could have sworn this worked before. What am I doing wrong? ruby 1.8.6 -- Posted via http://www.ruby-forum.com/.