Index: src/string.js |
diff --git a/src/string.js b/src/string.js |
index f4489efa12182262b748d15ee6863b1eb357ecbd..b04c0c57fa3b774884761514229c84839d692028 100644 |
--- a/src/string.js |
+++ b/src/string.js |
@@ -450,9 +450,9 @@ function StringReplaceRegExpWithFunction(subject, regexp, replace) { |
} |
} else { |
var func_result = replace.call(null, elem, match_start, subject); |
- if (!IS_STRING(func_result)) func_result = TO_STRING(func_result); |
+ if (!IS_STRING(func_result)) func_result = NonStringToString(func_result); |
fschneider
2010/03/29 16:21:47
Long line.
Vitaly Repeshko
2010/03/29 16:52:53
You can use func_result = TO_STRING_INLINE(func_re
Lasse Reichstein
2010/03/29 18:58:31
Line wrapped.
Re. TO_STRING_INLINE, I considered i
|
res[i] = func_result; |
- match_start += elem.length; |
+ match_start += elem.length; |
} |
i++; |
} |
@@ -464,7 +464,7 @@ function StringReplaceRegExpWithFunction(subject, regexp, replace) { |
// Use the apply argument as backing for global RegExp properties. |
lastMatchInfoOverride = elem; |
var func_result = replace.apply(null, elem); |
- if (!IS_STRING(func_result)) func_result = TO_STRING(func_result); |
+ if (!IS_STRING(func_result)) func_result = NonStringToString(func_result); |
fschneider
2010/03/29 16:21:47
Long line.
Vitaly Repeshko
2010/03/29 16:52:53
Same here.
Lasse Reichstein
2010/03/29 18:58:31
Dittos.
|
res[i] = func_result; |
} |
i++; |