From: Sun Date: 2008-01-21T19:09:57+09:00 Subject: what does 'def [](var1)' means and how to use? I came cross a ruby class with function defined as: class A ...other functions... def [](var1) ... .... end end I do not know what this function is for and how to use it. any tips?