Browse files

... and ChunkedCons

  • Loading branch information...
1 parent 7e24cdd commit c77738389e4d377abbf96d27ff4e8578c04cbbf3 @daveray committed Oct 14, 2011
Showing with 4 additions and 1 deletion.
  1. +2 −1 lib/familiar.rb
  2. +2 −0 test/test_familiar.rb
View
3 lib/familiar.rb
@@ -59,7 +59,8 @@ def self.method_missing(meth, *args, &block)
Java::ClojureLang::Ref,
Java::ClojureLang::Agent,
Java::ClojureLang::Var,
- Java::ClojureLang::Cons
+ Java::ClojureLang::Cons,
+ Java::ClojureLang::ChunkedCons
].each do |x|
x.class_eval do
def to_s
View
2 test/test_familiar.rb
@@ -26,6 +26,7 @@ def test_to_s_looks_right
assert Familiar.agent('hi').to_s =~ /^clojure\.lang\.Agent@\h+$/
assert Familiar.vars.identity.to_s =~ /^#'clojure\.core\/identity$/
assert_equal '(1 2 3)', Familiar.cons(1, Familiar.list(2, 3)).to_s
+ assert_equal '(1 2 3 4)', Familiar.rest(Familiar.range(5)).to_s
end
def test_inspect_looks_right
@@ -41,6 +42,7 @@ def test_inspect_looks_right
assert Familiar.agent('hi').inspect =~ /^#<Agent@\h+: "hi">$/
assert Familiar.vars.identity.inspect =~ /^#'clojure\.core\/identity$/
assert_equal '(1 2 3)', Familiar.cons(1, Familiar.list(2, 3)).inspect
+ assert_equal '(1 2 3 4)', Familiar.rest(Familiar.range(5)).inspect
end
def test_can_create_a_function_from_a_lambda

0 comments on commit c777383

Please sign in to comment.