# File lib/unified_ruby.rb, line 265 def rewrite_masgn(exp) t, lhs, lhs_splat, rhs = exp lhs ||= s(:array) if lhs_splat then case lhs_splat.first when :array then lhs_splat = lhs_splat.last if lhs_splat.last.first == :splat when :splat then # do nothing else lhs_splat = s(:splat, lhs_splat) end lhs << lhs_splat end # unwrap RHS from array IF it is only a splat node rhs = rhs.last if rhs && # TODO: rhs.structure =~ s(:array, s(:splat)) rhs.size == 2 && rhs.structure.flatten.first(2) == [:array, :splat] s(t, lhs, rhs).compact end