]> gitweb.factorcode.org Git - factor.git/commitdiff
classes.tuple: use class-of in tuple>array.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 24 Sep 2015 14:55:08 +0000 (07:55 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 24 Sep 2015 14:58:02 +0000 (07:58 -0700)
core/classes/tuple/tuple-docs.factor
core/classes/tuple/tuple.factor

index 1d879e4fa2e002a6be74e1b06519321650ee4fb1..8e41bfbe129723a597c865d1c012c3d9a8b35edf 100644 (file)
@@ -200,6 +200,7 @@ ARTICLE: "tuple-introspection" "Tuple introspection"
     >tuple
     tuple>array
     tuple-slots
+    slots>tuple
 }
 "Tuples can be compared for slot equality even if the tuple class overrides " { $link equal? } ":"
 { $subsections tuple= }
index 77993bba209b921f50577a97460e70a322b28194..d730128d38af647ab1e1dd6e0bb6c4a806433e94 100644 (file)
@@ -103,8 +103,8 @@ M: tuple-class slots>tuple ( seq class -- tuple )
         bi 2each
     ] keep ;
 
-: tuple>array ( tuple -- array )
-    [ tuple-slots ] [ layout-of first prefix ] bi ;
+: tuple>array ( tuple -- seq )
+    [ tuple-slots ] [ class-of prefix ] bi ;
 
 : >tuple ( seq -- tuple )
     unclip slots>tuple ;