summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/test/unit/assertions.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 80d9375bba..45e89d1ba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 14 15:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/test/unit/assertions.rb (build_message): skip escaped
+ question marks.
+
Tue Feb 14 12:10:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (autoload_const_set, autoload_require): fix
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 49987fab57..39a3c85600 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -317,7 +317,7 @@ EOT
def build_message(head, template=nil, *arguments) #:nodoc:
template &&= template.chomp
- template.gsub(/\?/) { mu_pp(arguments.shift) }
+ template.gsub(/\G((?:[^\\]|\\.)*?)(\\)?\?/) { $1 + ($2 ? "?" : mu_pp(arguments.shift)) }
end
end
end