Skip to content

Conversation

p8
Copy link
Member

@p8 p8 commented May 29, 2020

Summary

Calling Object#inspect returns a string starting with a pound sign (#):

=> "#<Object:0x00007fb4b115b428>"

Some custom inspect implementations did not:

ActionController::Parameters.new({}).inspect
=> "<ActionController::Parameters {} permitted: false>"

This change make everything more consistent by always starting with the pound sign.

Move the # outside the < > just like regular Object#inspect
@rails-bot rails-bot bot added the railties label May 29, 2020
@tenderlove tenderlove merged commit 35fe9bc into rails:master Jun 3, 2020
@p8 p8 deleted the improve-inspect branch June 3, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants