Browse Source

Replace LINQ exp with foreach()

Frederic Torres 11 years ago
parent
commit
57bfb5306b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Jint/Native/String/StringPrototype.cs

+ 4 - 1
Jint/Native/String/StringPrototype.cs

@@ -298,7 +298,10 @@ namespace Jint.Native.String
 
 
                 if (sep == string.Empty || (rx != null && rx.Source == regExpForMatchingAllCharactere)) // for s.split(new RegExp)
                 if (sep == string.Empty || (rx != null && rx.Source == regExpForMatchingAllCharactere)) // for s.split(new RegExp)
                 {
                 {
-                    segments.AddRange(from object c in s select c.ToString());
+                    foreach (var c in s)
+                    {
+                        segments.Add(c.ToString());    
+                    }
                 }
                 }
                 else
                 else
                 {
                 {