diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-14 06:06:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-14 06:06:40 +0000 |
commit | 799680354ebe7cc7af7fed9766451df27e2f28fc (patch) | |
tree | b7f9d69f8b84f3d84d73102f2efcb1f93475f205 | |
parent | 391b579097f233cb734f89c6c39257e77473fa51 (diff) |
* lib/test/unit/assertions.rb (build_message): skip escaped
question marks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/test/unit/assertions.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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 |