Skip to content

Commit 85ee719

Browse files
committed
Let's use String#inspect instead of #to_s for string variables.
see https://youtrack.jetbrains.com/issue/RUBY-16192
1 parent db3d0da commit 85ee719

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def print_variable(name, value, kind)
154154
end
155155
elsif value.is_a?(String)
156156
has_children = value.respond_to?('bytes') || value.respond_to?('encoding')
157-
value_str = value
157+
value_str = value.inspect
158158
else
159159
has_children = !value.instance_variables.empty? || !value.class.class_variables.empty?
160160
value_str = value.to_s || 'nil' rescue "<#to_s method raised exception: #{$!}>"

0 commit comments

Comments
 (0)