Skip to content

Commit

Permalink
- Avoid using 'match?' to support older ruby versions. (y-yagi)
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 12317]
  • Loading branch information
zenspider committed Sep 27, 2019
1 parent d7f1133 commit 72accb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/minitest/assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def mu_pp_for_diff obj
str = mu_pp obj

# both '\n' & '\\n' (_after_ mu_pp (aka inspect))
single = str.match?(/(?<!\\|^)\\n/)
double = str.match?(/(?<=\\|^)\\n/)
single = !!str.match(/(?<!\\|^)\\n/)
double = !!str.match(/(?<=\\|^)\\n/)

process =
if single ^ double then
Expand Down

0 comments on commit 72accb0

Please sign in to comment.