From 45db337c76b87d59315a549b165f3e0578956ff0 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 17 Jun 2014 20:11:59 +0200 Subject: [PATCH] Use Array#unshift for multiple xpath call args. --- lib/oga/xpath/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/parser.y b/lib/oga/xpath/parser.y index 1f3956b..c0e8fc0 100644 --- a/lib/oga/xpath/parser.y +++ b/lib/oga/xpath/parser.y @@ -73,7 +73,7 @@ rule call_args : paths { val } - | paths T_COMMA call_args { [val[0], *val[2]] } + | paths T_COMMA call_args { val[2].unshift(val[0]) } ; string