New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unreachable code #1319

Merged
merged 4 commits into from Jun 13, 2016

Conversation

Projects
None yet
5 participants
@joshuaclayton
Contributor

joshuaclayton commented Jun 10, 2016

Hi all!

I've been fascinated by identifying and removing dead code and unreachable code, so I built a tool called "unused" (https://github.com/joshuaclayton/unused) and ran it on the codebase.

This is a PR removing discrete chunks of unreachable code, with context in each commit around when the surrounding code using it was changed.

joshuaclayton added some commits Jun 10, 2016

Remove unreachable code: Rubygem.versions_key
Methods regarding Redis were removed in
9207533; however, Rubygem.versions_key
was not.
Remove unreachable code: Version#to_index
The code surrounding Version#to_index usage was in
232dcf6.
Remove code only used in a test: Version.with_deps
The majority of code using Version.with_deps revolved around Redis,
which was removed in 9207533.
Remove unreachable code: ActiveSupport::TestCase.should_forbid_access…
…_when

All tests using this method switched to an alternate way to assert
correct behavior in b235aeb.
@dwradcliffe

This comment has been minimized.

Show comment
Hide comment
@dwradcliffe

dwradcliffe Jun 13, 2016

Member

LGTM

Another quick look @qrush or @arthurnn?

Member

dwradcliffe commented Jun 13, 2016

LGTM

Another quick look @qrush or @arthurnn?

@arthurnn arthurnn merged commit 8ca370b into rubygems:master Jun 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@arthurnn

This comment has been minimized.

Show comment
Hide comment
@arthurnn

arthurnn Jun 13, 2016

Member

thanks

Member

arthurnn commented Jun 13, 2016

thanks

@qrush

This comment has been minimized.

Show comment
Hide comment
@qrush

qrush Jun 13, 2016

Member

👍 🔪

Member

qrush commented Jun 13, 2016

👍 🔪

@dwradcliffe dwradcliffe deployed to production Jun 14, 2016 Active

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment