diff --git a/JSIL.Libraries/Includes/Bootstrap/Linq/Classes/System.Linq.Enumerable.js b/JSIL.Libraries/Includes/Bootstrap/Linq/Classes/System.Linq.Enumerable.js
index 5980d9d17..af120e6c9 100644
--- a/JSIL.Libraries/Includes/Bootstrap/Linq/Classes/System.Linq.Enumerable.js
+++ b/JSIL.Libraries/Includes/Bootstrap/Linq/Classes/System.Linq.Enumerable.js
@@ -557,6 +557,32 @@
}
);
+ $.Method({ Static: true, Public: true }, "Repeat",
+ new JSIL.MethodSignature(
+ $jsilcore.TypeRef("System.Collections.Generic.IEnumerable`1", ["!!0"]),
+ ["!!0", "System.Int32"],
+ ["TResult"]),
+ function Repeat$b1(TResult, element, count) {
+ var i = 0;
+
+ return new (JSIL.AbstractEnumerable.Of(TResult))(
+ function getNext(result) {
+ if (i < count) {
+ i++;
+ result.set(element);
+ return true;
+ }
+ return false;
+ },
+ function reset() {
+ i = 0;
+ },
+ function dispose() {
+ }
+ );
+ }
+ );
+
$.Method({ Static: true, Public: true }, "Where",
new JSIL.MethodSignature($jsilcore.TypeRef("System.Collections.Generic.IEnumerable`1", ["!!0"]), [$jsilcore.TypeRef("System.Collections.Generic.IEnumerable`1", ["!!0"]), $jsilcore.TypeRef("System.Func`2", ["!!0", $.Boolean])], ["TSource"]),
function Where$b1(TSource, source, predicate) {
diff --git a/Tests/SimpleTestCases/EnumerableRepeat.cs b/Tests/SimpleTestCases/EnumerableRepeat.cs
new file mode 100644
index 000000000..6c64a22bb
--- /dev/null
+++ b/Tests/SimpleTestCases/EnumerableRepeat.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+public static class Program {
+ public static void Main () {
+
+ foreach (var x in Enumerable.Repeat("x", 5))
+ Console.WriteLine(x);
+
+ }
+}
diff --git a/Tests/SimpleTests.csproj b/Tests/SimpleTests.csproj
index dc6faeada..f021964fd 100644
--- a/Tests/SimpleTests.csproj
+++ b/Tests/SimpleTests.csproj
@@ -311,6 +311,7 @@
+