1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-12-15 17:44:15 +00:00
parent 7c4306e6e9
commit 60e21a9e93
3 changed files with 20 additions and 2 deletions

View file

@ -3,6 +3,7 @@ require 'mspec/helpers/argv'
require 'mspec/helpers/datetime'
require 'mspec/helpers/fixture'
require 'mspec/helpers/flunk'
require 'mspec/helpers/frozen_error_class'
require 'mspec/helpers/fs'
require 'mspec/helpers/io'
require 'mspec/helpers/mock_to_path'

View file

@ -0,0 +1,17 @@
require 'mspec/guards/version'
# This helper makes it easy to write version independent
# specs for frozen objects.
unless respond_to? :frozen_error_class
ruby_version_is "2.5" do
def frozen_error_class
FrozenError
end
end
ruby_version_is ""..."2.5" do
def frozen_error_class
RuntimeError
end
end
end

View file

@ -262,11 +262,11 @@ class LeakChecker
leaked = false
if new_internal != old_internal
leaked = true
puts "Encoding.default_internal changed: #{test_name} : #{old_internal} to #{new_internal}"
puts "Encoding.default_internal changed: #{test_name} : #{old_internal.inspect} to #{new_internal.inspect}"
end
if new_external != old_external
leaked = true
puts "Encoding.default_external changed: #{test_name} : #{old_external} to #{new_external}"
puts "Encoding.default_external changed: #{test_name} : #{old_external.inspect} to #{new_external.inspect}"
end
@encoding_info = [new_internal, new_external]
return leaked