Skip to content
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 pretend-nils #843

Merged
merged 3 commits into from
Nov 13, 2021
Merged

Remove pretend-nils #843

merged 3 commits into from
Nov 13, 2021

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Nov 13, 2021

  • Don't pretend console self is nil
  • Use #empty? instead of #nil? to distinguish empty commands
  • Simplify implementation of have_exit_status matcher

Summary

Remove methods that make non-nil objects pretend they are nil.

Details

Removes implementations of #nil? that returned true for classes that are not NilClass; Also updates the #inspect method for self in the Aruba console not to return the string "nil".

Motivation and Context

Having objects respond with true to the #nil? message is super-confusing for humans, machines and cyborgs.

How Has This Been Tested?

I ran the specs and cukes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

mvz added 3 commits November 13, 2021 15:21
When running the console, evaluating 'self' should not print 'nil'.
Print something indicating we're in the Aruba console instead.
@mvz mvz merged commit 19f3c74 into main Nov 13, 2021
@mvz mvz deleted the no-pretend-nils branch November 13, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant