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

make Element#inspect behave correctly in Ruby 2.0 #16

Merged
merged 1 commit into from
Nov 13, 2013

Conversation

seanlinsley
Copy link
Contributor

As of ruby/ruby@fd7dc23d281f, Kernel#inspect no longer uses to_s if it's defined.
This means that if Element#inspect is called, you'll currently get every instance
variable printed out instead of the expected HTML.

This is causing serious issues for Active Admin when combined with better_errors: activeadmin/activeadmin#2434

Other references:

As of ruby/ruby@fd7dc23d281f, `Kernel#inspect` no longer uses `to_s` if it's defined.
This means that if `Element#inspect` is called, you'll currently get every instance
variable printed out instead of the expected HTML.
seanlinsley added a commit that referenced this pull request Nov 13, 2013
make `Element#inspect` behave correctly in Ruby 2.0
@seanlinsley seanlinsley merged commit a0ec323 into activeadmin:master Nov 13, 2013
@seanlinsley seanlinsley deleted the make-inspect-use-to_s branch November 13, 2013 18:09
@shekibobo
Copy link
Contributor

Wooo!!! 💚

@mariusandra
Copy link

Please release a new gem that contains this fix. The 1.0.1 that's up is from 2012.

@maxnovee
Copy link

maxnovee commented May 8, 2014

+1 for gem release

@elia
Copy link
Member

elia commented Jun 10, 2014

bumping for gem release (last is from almost 2yrs ago, as noted by @Marius0)

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.

5 participants