Skip to content

Commit af00d6b

Browse files
committed
improve vector inspect
1 parent 66536be commit af00d6b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/daru/vector.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,12 @@ def to_html threshold=30
748748

749749
if num > threshold
750750
html += '<tr><td>...</td><td>...</td></tr>'
751+
752+
last_index = @index.to_a.last
753+
html += '<tr>' +
754+
'<td>' + last_index.to_s + '</td>' +
755+
'<td>' + self[last_index].to_s + '</td>' +
756+
'</tr>'
751757
break
752758
end
753759
end

0 commit comments

Comments
 (0)