From: Lucas Bajolet Date: Fri, 7 Mar 2014 16:56:54 +0000 (-0500) Subject: stdlib/strings: Repaired hash for Buffers. X-Git-Tag: v0.6.5~7^2~3^2~1 X-Git-Url: http://nitlanguage.org stdlib/strings: Repaired hash for Buffers. Signed-off-by: Lucas Bajolet --- diff --git a/lib/standard/string.nit b/lib/standard/string.nit index b34e043..dd5ed1b 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -1012,6 +1012,12 @@ abstract class Buffer # Adds the content of text `s` at the end of self fun append(s: Text) is abstract + redef fun hash + do + if is_dirty then hash_cache = null + return super + end + end # Mutable strings of characters.