Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix debug helper not inspecting when it can't convert to YAML #9387

Merged
merged 1 commit into from

2 participants

@bouk

The debug helper should inspect the object when it can't be converted to YAML, this behavior was changed in 8f8d8eb1465069e2ed9b6f2404aa9d02e785f534

According to the documentation the helper should call inspect when converting to YAML fails.

@bouk bouk Fix debug helper not inspecting on Exception
The debug helper should inspect the object when it can't be converted to YAML, this behavior was changed in 8f8d8eb1465069e2ed9b6f2404aa9d02e785f534.
de47fc2
@carlosantoniodasilva carlosantoniodasilva merged commit cad397e into rails:master
@carlosantoniodasilva

Nice catch, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2013
  1. @bouk

    Fix debug helper not inspecting on Exception

    bouk authored
    The debug helper should inspect the object when it can't be converted to YAML, this behavior was changed in 8f8d8eb1465069e2ed9b6f2404aa9d02e785f534.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/debug_helper.rb
View
2  actionpack/lib/action_view/helpers/debug_helper.rb
@@ -32,7 +32,7 @@ def debug(object)
content_tag(:pre, object, :class => "debug_dump")
rescue Exception # errors from Marshal or YAML
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
- content_tag(:code, object.to_yaml, :class => "debug_dump")
+ content_tag(:code, object.inspect, :class => "debug_dump")
end
end
end
Something went wrong with that request. Please try again.