Skip to content

Commit

Permalink
- Remove check for .b method. (tenderlove)
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/minitest/dev/": change = 13574]
  • Loading branch information
zenspider committed Oct 19, 2022
1 parent 4accdd5 commit b5565c0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/minitest.rb
Expand Up @@ -823,7 +823,7 @@ def aggregated_results io # :nodoc:
end

def to_s # :nodoc:
aggregated_results(StringIO.new(binary_string)).string
aggregated_results(StringIO.new(''.b)).string
end

def summary # :nodoc:
Expand All @@ -836,14 +836,6 @@ def summary # :nodoc:
"%d runs, %d assertions, %d failures, %d errors, %d skips%s" %
[count, assertions, failures, errors, skips, extra]
end

private

if '<3'.respond_to? :b
def binary_string; ''.b; end
else
def binary_string; ''.force_encoding(Encoding::ASCII_8BIT); end
end
end

##
Expand Down

0 comments on commit b5565c0

Please sign in to comment.