-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Subclasses of BasicObject are rare in general, but pretty common in testing/mocking frameworks.
Today, the logic in print_variable will raise NoMethodError for such objects, and always hit this rescue:
ruby-debug-ide/lib/ruby-debug-ide/xml_printer.rb
Lines 310 to 312 in 3a74a47
| print_debug "Unexpected exception \"%s\"\n%s", e.to_s, e.backtrace.join("\n") | |
| print("<variable name=\"%s\" kind=\"%s\" value=\"%s\"/>", | |
| CGI.escapeHTML(name), kind, CGI.escapeHTML(safe_to_string(value))) |
You can see this other PR of mine to see what's involved, but in short:
- Replacing
object.is_a?(Foo)withFoo === object - Replacing
object.to_swithKernel.instance_method(:to_s).bind_call(object)
Before I try this, would this be a welcome contribution to merge?
Metadata
Metadata
Assignees
Labels
No labels