Merge pull request #5020 from jethrodaniel/master

only use GEMNAME if defined in assert.rb
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-06-08 15:51:03 +09:00
committed by GitHub
+3 -1
View File
@@ -56,7 +56,9 @@ def assertion_string(err, str, iso=nil, e=nil, bt=nil)
msg = "#{err}#{str}"
msg += " [#{iso}]" if iso && !iso.empty?
msg += " => #{e}" if e && !e.to_s.empty?
msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})"
if Object.const_defined?(:GEMNAME)
msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})"
end
if $mrbtest_assert
$mrbtest_assert.each do |idx, assert_msg, diff|
msg += "\n - Assertion[#{idx}]"