From 7cc03e888bb28cc5d42532d575352b731abdebe2 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Tue, 7 Apr 2009 14:23:44 +0000 Subject: Fixed Stack.push by applying Rich Dougherty's p... Fixed Stack.push by applying Rich Dougherty's patch --- src/library/scala/collection/immutable/Stack.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/library') diff --git a/src/library/scala/collection/immutable/Stack.scala b/src/library/scala/collection/immutable/Stack.scala index 7aff093471..b8398614ea 100644 --- a/src/library/scala/collection/immutable/Stack.scala +++ b/src/library/scala/collection/immutable/Stack.scala @@ -64,7 +64,7 @@ class Stack[+A] extends Seq[A] { * @param elems the element sequence. * @return the stack with the new elements on top. */ - def push[B >: A](elems: B*): Stack[B] = this ++ elems + def push[B >: A](elem1: B, elem2: B, elems: B*): Stack[B] = this.push(elem1).push(elem2) ++ elems /** Push all elements provided by the given iterable object onto * the stack. The last element returned by the iterable object -- cgit v1.2.3