lib/rspec/mocks/instance_method_stasher.rb in rspec-mocks-3.0.0.rc1 vs lib/rspec/mocks/instance_method_stasher.rb in rspec-mocks-3.0.0

- old
+ new

@@ -71,18 +71,18 @@ @original_method = nil end end - if RUBY_DESCRIPTION.include?('2.0.0p247') - # ruby 2.0.0-p247 has a bug that we can't work around :(. + if RUBY_DESCRIPTION.include?('2.0.0p247') || RUBY_DESCRIPTION.include?('2.0.0p195') + # ruby 2.0.0-p247 and 2.0.0-p195 both have a bug that we can't work around :(. # https://bugs.ruby-lang.org/issues/8686 def handle_restoration_failures yield rescue TypeError RSpec.warn_with( "RSpec failed to properly restore a partial double (#{@object.inspect}) " + - "to its original state due to a known bug in MRI 2.0.0-p247 " + + "to its original state due to a known bug in MRI 2.0.0-p195 & p247 " + "(https://bugs.ruby-lang.org/issues/8686). This object may remain " + "screwed up for the rest of this process. Please upgrade to 2.0.0-p353 or above.", :call_site => nil, :use_spec_location_as_call_site => true ) end