From: justincollins@... Date: 2011-09-01T07:06:39+09:00 Subject: Re: ripper on array access operation Quoting "Surya G." : > Ripper.sexp('a[1]') > > yeilds the following output > > > [:program, [[:aref, [:var_ref, [:@ident, "a", [1, 0]]], > [:args_add_block, [[:@int, "1", [1, 2]]], false]]]] > > > i am trying to figure out where the information that the methods :[] was > called is present. > > > But when i do > > Ripper.sexp('a.[](0)') > > [:program, [[:method_add_arg, [:call, [:var_ref, [:@ident, "a", [1, > 0]]], :".", [:@op, "[]", [1, 2]]], [:arg_paren, [:args_add_block, > [[:@int, "0", [1, 5]]], false]]]]] > > I get the information about which method was called. > > -- > Posted via http://www.ruby-forum.com/. > > I am pretty sure it's the :aref part. Ripper is making [] a special case. -Justin