diff --git a/src/IteratorPipeline/Pipeline.php b/src/IteratorPipeline/Pipeline.php
index <HASH>..<HASH> 100644
--- a/src/IteratorPipeline/Pipeline.php
+++ b/src/IteratorPipeline/Pipeline.php
@@ -98,7 +98,7 @@ class Pipeline implements \IteratorAggregate
      */
     final public static function with(iterable $iterable): self
     {
-        return new static($iterable);
+        return $iterable instanceof static ? $iterable : new static($iterable);
     }
 
     /**
diff --git a/tests/IteratorPipeline/PipelineTest.php b/tests/IteratorPipeline/PipelineTest.php
index <HASH>..<HASH> 100644
--- a/tests/IteratorPipeline/PipelineTest.php
+++ b/tests/IteratorPipeline/PipelineTest.php
@@ -119,6 +119,15 @@ class PipelineTest extends TestCase
         $this->assertAttributeSame($values, 'iterable', $pipeline);
     }
 
+    public function testWithSelf()
+    {
+        $input = new Pipeline([]);
+        $pipeline = Pipeline::with($input);
+
+        $this->assertInstanceOf(Pipeline::class, $pipeline);
+        $this->assertSame($input, $pipeline);
+    }
+
     public function testBuild()
     {
         $builder = Pipeline::build();
Passing a Pipeline to `with` returns the input (nop).