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

Give Null a meaningful inspect method #1

merged 1 commit into from Oct 28, 2012


Copy link

@nilbus nilbus commented Jul 21, 2012

Hi Marcin,

First - thanks for throwing this gem together. Having this gem makes it a lot easier to put the ideas from Avdi's talk and the Null Object pattern into practice.

I added the inspect method to make debugging better. Inspecting an object and seeing nothing at all makes it very unclear what's going on, especially to other developers who aren't familiar with the how Null objects act.

1.9.3p125 :001 > require './lib/nullobject'
 => true
1.9.3p125 :002 > Null::Object.instance
 => #<Null::Object:0x8089d624>

This is also consistent with Avdi's slides.

Copy link
Contributor Author

nilbus commented Sep 18, 2012

Any thoughts on this?

Copy link

pcreux commented Oct 25, 2012


martinciu added a commit that referenced this issue Oct 28, 2012
Give Null a meaningful inspect method
@martinciu martinciu merged commit e0930fa into martinciu:master Oct 28, 2012
Copy link

martinciu commented Oct 28, 2012

@nilbus apologize about delay. It's merged and new version of the released. Thanks!

Copy link
Contributor Author

nilbus commented Oct 28, 2012

Thanks! :-)

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

Successfully merging this pull request may close these issues.

None yet

3 participants