@private
ruby 2.0.0-p247 and 2.0.0-p195 both have a bug that we can’t work around :(. bugs.ruby-lang.org/issues/8686
# File lib/rspec/mocks/instance_method_stasher.rb, line 79 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-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
@private
# File lib/rspec/mocks/instance_method_stasher.rb, line 18 def method_is_stashed? @method_is_stashed end
@private
# File lib/rspec/mocks/instance_method_stasher.rb, line 37 def restore return unless @method_is_stashed if @klass.__send__(:method_defined?, @method) @klass.__send__(:undef_method, @method) end @klass.__send__(:alias_method, @method, stashed_method_name) @klass.__send__(:remove_method, stashed_method_name) @method_is_stashed = false end
Generated with the Darkfish Rdoc Generator 2.