Browse files

make RT/print print Pattern literals

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
1 parent a3f2c4e commit edbc2cad32350492eee0cdafc24b6ec3b3ec6105 @cgrand cgrand committed with stuarthalloway Apr 30, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/jvm/clojure/lang/RT.java
View
5 src/jvm/clojure/lang/RT.java
@@ -16,6 +16,7 @@
import java.util.concurrent.Callable;
import java.util.*;
import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
@@ -1402,6 +1403,10 @@ else if(x instanceof Var) {
Var v = (Var) x;
w.write("#=(var " + v.ns.name + "/" + v.sym + ")");
}
+ else if(x instanceof Pattern) {
+ Pattern p = (Pattern) x;
+ w.write("#\"" + p.pattern() + "\"");
+ }
else w.write(x.toString());
}
//*/

0 comments on commit edbc2ca

Please sign in to comment.