From 5ae3010e5acff9be58cf4c9e2d5cf5ec129dae8c Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Mon, 19 Jan 2015 16:02:51 -0500 Subject: [PATCH] Clarify replace(...)'s behavior on nil --- README.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.asciidoc b/README.asciidoc index d51cc017b6..f5ee91fb5e 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -69,7 +69,8 @@ Perl and Javascript use. [[proc-replace]] ==== replace(string, Regex, sub): string -Replaces each match of Regex in the string with `sub`. +Replaces each match of Regex in the string with `sub`, which should never be +or return `nil`. If `sub` is a `proc (RegexMatch): string`, then it is executed with each match and the return value is the replacement value.