summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2013-02-21 16:31:35 -0600
committerSimon Hafner <hafnersimon@gmail.com>2013-02-21 16:31:35 -0600
commite366eeaafc0b834cd57d0aa4bc16925271c4a79f (patch)
tree901ca0d33bb9a08d0a4f0b920a054a2761622693 /lib
parentbf82f79f1e27b4580672af457a95f3d85ea781a4 (diff)
downloadNim-e366eeaafc0b834cd57d0aa4bc16925271c4a79f.tar.gz
added $ for refs and removed == for ref test
== in refs should use the pointer to compare
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index db78d2740..3f15dbeaf 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1557,6 +1557,8 @@ proc `<`*[T: tuple](x, y: T): bool =
     if c > 0: return false
   return false
 
+proc `$`*[T: ref](x: T): string = $x[]
+
 proc `$`*[T: tuple|object](x: T): string = 
   ## generic ``$`` operator for tuples that is lifted from the components
   ## of `x`. Example: