Permalink
Browse files

Fix for ruby 1.8

  • Loading branch information...
blambeau committed Jun 13, 2012
1 parent 17d50ec commit b2adebda410c6a87f3e69a68d08da745442eaff2
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/wlang/html.rb
  2. +1 −0 spec/unit/test_assumptions.rb
View
@@ -72,7 +72,7 @@ def star(buf, coll_fn, elm_fn, between_fn)
def greater(buf, fn)
val = evaluate(fn)
val = Html.compile(val) if String === val
- val = val.call if Proc === val and val.arity==0
+ val = val.call if Proc === val and val.arity<=0
render(val, nil, buf)
end
@@ -22,6 +22,7 @@ def arity2(fn1,fn2); end
it "lambda arity" do
lambda{|| }.arity.should eq(0)
+ (lambda{ }.arity <= 0).should be_true
lambda{|fn|}.arity.should eq(1)
lambda{|fn1,fn2|}.arity.should eq(2)
end

0 comments on commit b2adebd

Please sign in to comment.