Skip to content
This repository
Browse code

- Made hex handling (eg object_ids) in mu_pp_for_diff more specific. …

…(maxim)

[git-p4: depot-paths = "//src/minitest/dev/": change = 8162]
  • Loading branch information...
commit b5a48b0d11214d468970b0558ce9d096f4ed16e0 1 parent 3dd26d4
Ryan Davis zenspider authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/minitest/unit.rb
4 lib/minitest/unit.rb
@@ -172,8 +172,8 @@ def mu_pp obj
172 172 # newlines and makes hex-values generic (like object_ids). This
173 173 # uses mu_pp to do the first pass and then cleans it up.
174 174
175   - def mu_pp_for_diff obj # TODO: possibly rename
176   - mu_pp(obj).gsub(/\\n/, "\n").gsub(/0x[a-f0-9]+/m, '0xXXXXXX')
  175 + def mu_pp_for_diff obj
  176 + mu_pp(obj).gsub(/\\n/, "\n").gsub(/:0x[a-f0-9]{4,12}/m, ':0xXXXXXX')
177 177 end
178 178
179 179 def _assertions= n # :nodoc:

0 comments on commit b5a48b0

Please sign in to comment.
Something went wrong with that request. Please try again.