Skip to content

Commit

Permalink
strip metadata from syms used in keywords, fixes #693
Browse files Browse the repository at this point in the history
  • Loading branch information
richhickey committed Dec 17, 2010
1 parent 2879523 commit 1109a8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jvm/clojure/lang/Keyword.java
Expand Up @@ -27,6 +27,8 @@ public final class Keyword implements IFn, Comparable, Named, Serializable {
final int hash;

public static Keyword intern(Symbol sym){
if(sym.meta() != null)
sym = (Symbol) sym.withMeta(null);
Util.clearCache(rq, table);
Keyword k = new Keyword(sym);
SoftReference<Keyword> existingRef = table.putIfAbsent(sym, new SoftReference<Keyword>(k,rq));
Expand Down

0 comments on commit 1109a8b

Please sign in to comment.