From: gwtmp01@... Date: 2005-10-28T04:31:59+09:00 Subject: Argument Passing Syntax Why are arguments to the '[]' method parsed differently than a standard method? class A def m1(*args) puts args.inspect end def [](*args) puts args.inspect end end irb> a = A.new => # irb> a.m1(1,2) [1, 2] => nil irb> a.m1(1 => 2) [{1=>2}] => nil irb> a.m1(1, 2 => 3) [1, {2=>3}] => nil irb> a[1,2] [1, 2] => nil irb> a[1 => 2] [{1=>2}] => nil irb> a[1, 2 => 3] SyntaxError: compile error (irb):15: syntax error a[1, 2 => 3] ^ from (irb):15 Gary Wright