1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplify multiline condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-10-15 11:28:52 +00:00
parent e67b307e55
commit 1451377e75

View file

@ -497,7 +497,7 @@ eom
unless match unless match
msg = message(msg) { msg = message(msg) {
expect_msg = "Expected #{mu_pp pattern}\n" expect_msg = "Expected #{mu_pp pattern}\n"
if /\n[^\n]+\n/ =~ rest if /\n[^\n]/ =~ rest
actual_mesg = "to match\n" actual_mesg = "to match\n"
rest.scan(/.*\n+/) { rest.scan(/.*\n+/) {
actual_mesg << ' ' << $&.inspect << "+\n" actual_mesg << ' ' << $&.inspect << "+\n"