Skip to content

Commit 5aa131b

Browse files
committed
c'mon it's 2014 already
1 parent 17f8329 commit 5aa131b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ def print_variable(name, value, kind)
150150
unless has_children
151151
value_str = "Empty #{value.class}"
152152
else
153-
value_str = "#{value.class} (#{value.size} element(s))"
153+
size = value.size
154+
value_str = "#{value.class} (#{value.size} element#{size > 1 ? "s" : "" })"
154155
end
155156
elsif value.is_a?(String)
156157
has_children = value.respond_to?('bytes') || value.respond_to?('encoding')

0 commit comments

Comments
 (0)