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

Stringify when a non-object is passed to PP#text #165

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Jan 4, 2021

If a nested object is passed to #pp, it may be sometimes passed to the #text method as an object without being stringified.

This is fixed on the Ruby main repository, but it was a bug of Ripper so still needs this workaround for using irb as a gem on Ruby 3.0.0 or earlier.

@aycabta aycabta force-pushed the stringify-when-a-non-object-is-passed-to-pp-text branch 3 times, most recently from 8804d93 to 1a60403 Compare January 4, 2021 15:31
@aycabta aycabta requested a review from k0kubun January 4, 2021 15:32
lib/irb/color_printer.rb Outdated Show resolved Hide resolved
If a nested object is passed to #pp, it may be sometimes passed to the #text
method as an object without being stringified.

This is fixed on the Ruby main repository;
ruby/ruby@433a3be
but it was a bug of Ripper so still needs this workaround for using irb
as a gem on Ruby 3.0.0 or earlier.

Co-authored-by: k0kubun <[email protected]>
@aycabta aycabta force-pushed the stringify-when-a-non-object-is-passed-to-pp-text branch from 1a60403 to 8d13df2 Compare January 5, 2021 01:04
@aycabta
Copy link
Member Author

aycabta commented Jan 5, 2021

Fixed them.

@aycabta aycabta requested a review from k0kubun January 5, 2021 01:20
Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

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

👍

@aycabta aycabta merged commit 8257f79 into ruby:master Jan 5, 2021
@aycabta aycabta deleted the stringify-when-a-non-object-is-passed-to-pp-text branch January 5, 2021 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants