From ebcac67995d6af38214d22f3140906f4781f5da3 Mon Sep 17 00:00:00 2001 From: slava Date: Thu, 2 Feb 2006 05:30:03 +0000 Subject: [PATCH] Fix inspector error with empty hashtable --- library/test/inspector.factor | 1 + library/tools/inspector.factor | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/library/test/inspector.factor b/library/test/inspector.factor index 509835b4e6..ed5017d3b8 100644 --- a/library/test/inspector.factor +++ b/library/test/inspector.factor @@ -12,3 +12,4 @@ V{ } clone inspector-stack set [ 1 2 3 ] (inspect) f (inspect) \ + (inspect) +H{ } (inspect) diff --git a/library/tools/inspector.factor b/library/tools/inspector.factor index b74e04bf17..b41c3d0e6f 100644 --- a/library/tools/inspector.factor +++ b/library/tools/inspector.factor @@ -18,7 +18,7 @@ SYMBOL: inspector-stack : (inspect) ( obj -- ) dup inspector-stack get push dup summary print - sheet sheet-numbers sheet. ; + sheet dup empty? [ drop ] [ sheet-numbers sheet. ] if ; : inspector-help ( -- ) "Object inspector." print