Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Don't reset before_context_ivars in reset_memoized #2102

Merged
merged 2 commits into from
Oct 27, 2015
Merged

Don't reset before_context_ivars in reset_memoized #2102

merged 2 commits into from
Oct 27, 2015

Conversation

bootstraponline
Copy link
Contributor

This isn't intended to be merged. Tracking down a potential memory issue related to #2095 I'm expecting this PR to fail on Travis.

@bootstraponline
Copy link
Contributor Author

I expected to see the memory test fail, instead it's failing for some unknown reason.

1816 examples, 0 failures, 3 pending

The command "script/run_build" exited with 2.
https://travis-ci.org/rspec/rspec-core/jobs/87574215

@bootstraponline
Copy link
Contributor Author

It looks like master is failing with the same error. I guess the issue is flaky tests. This change should be safe to merge then.

@bootstraponline
Copy link
Contributor Author

lib/rspec/core/rake_task.rb
RSpec::Support.define_optimized_require_for_rspec(:core) { |f| require_relative "../#{f}" }

shows up as missing in the coverage report which explains the exit code.

@@ -4,9 +4,11 @@

RSpec::Support.require_rspec_support "ruby_features"

# :nocov:
unless RSpec::Support.respond_to?(:require_rspec_core)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run locally on Ruby 2.2.3:

./script/rspec_with_simplecov spec --backtrace --format progress --profile --format progress

require_rspec_core is already defined so the unless block never executes (and counts against coverage).

JonRowe added a commit that referenced this pull request Oct 27, 2015
Don't reset before_context_ivars in reset_memoized
@JonRowe JonRowe merged commit 5507b69 into rspec:master Oct 27, 2015
@JonRowe
Copy link
Member

JonRowe commented Oct 27, 2015

👍

@bootstraponline bootstraponline deleted the memory_leak branch October 27, 2015 03:41
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this pull request Oct 30, 2020
Don't reset before_context_ivars in reset_memoized
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants