summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-04-07 14:23:44 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-04-07 14:23:44 +0000
commit7cc03e888bb28cc5d42532d575352b731abdebe2 (patch)
treef3c6dd0a720fc982cdd30382db9aebe2446cf126 /src/library
parentf2a72ec46b622493a9c2baab831eea92a07dee71 (diff)
downloadscala-7cc03e888bb28cc5d42532d575352b731abdebe2.tar.gz
scala-7cc03e888bb28cc5d42532d575352b731abdebe2.tar.bz2
scala-7cc03e888bb28cc5d42532d575352b731abdebe2.zip
Fixed Stack.push by applying Rich Dougherty's p...
Fixed Stack.push by applying Rich Dougherty's patch
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/immutable/Stack.scala2
1 files changed, 1 insertions, 1 deletions
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