From 1f6c943a87fe7e8f8e0d1611fafdd72108dac9d7 Mon Sep 17 00:00:00 2001 From: Oleg Sukhodolsky Date: Wed, 10 Dec 2014 16:07:07 +0300 Subject: [PATCH] Do not print empty value attr for variable if not needed In case RubyMine-specific protocol extensions are enabled we do not need to print value attr at all --- ChangeLog.md | 4 ++++ lib/ruby-debug-ide/version.rb | 2 +- lib/ruby-debug-ide/xml_printer.rb | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 427bae7..f84507e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +## [0.4.24.beta5](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.24.beta4...v0.4.24.beta5) + +* do not print empty value attr in case RubyMine-specific protocol extensions are enabled + ## [0.4.24.beta4](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.23...v0.4.24.beta4) * Performance optimisation for variable representation [RUBY-16055](https://youtrack.jetbrains.com/issue/RUBY-16055) diff --git a/lib/ruby-debug-ide/version.rb b/lib/ruby-debug-ide/version.rb index 19f963a..c7d9d49 100755 --- a/lib/ruby-debug-ide/version.rb +++ b/lib/ruby-debug-ide/version.rb @@ -1,3 +1,3 @@ module Debugger - IDE_VERSION='0.4.24.beta4' + IDE_VERSION='0.4.24.beta5' end diff --git a/lib/ruby-debug-ide/xml_printer.rb b/lib/ruby-debug-ide/xml_printer.rb index 1c838f0..2ee80ff 100644 --- a/lib/ruby-debug-ide/xml_printer.rb +++ b/lib/ruby-debug-ide/xml_printer.rb @@ -172,7 +172,7 @@ def print_variable(name, value, kind) end value_str = handle_binary_data(value_str) escaped_value_str = CGI.escapeHTML(value_str) - print("", + print("", CGI.escapeHTML(name), build_compact_value_attr(value), kind, build_value_attr(escaped_value_str), value.class, has_children, value.respond_to?(:object_id) ? value.object_id : value.id) print("", escaped_value_str) if Debugger.rm_protocol_extensions @@ -371,7 +371,7 @@ def build_compact_value_attr(value) end def build_value_attr(escaped_value_str) - Debugger.rm_protocol_extensions ? '' : escaped_value_str + Debugger.rm_protocol_extensions ? '' : "value=\"#{escaped_value_str}\"" end instance_methods.each do |m|