no args on stack

This commit is contained in:
Denis Knauf 2010-04-19 23:01:42 +02:00
parent 438fc48b3d
commit ad6f52e7f2

View file

@ -9,7 +9,7 @@ class Functional
def push_method code, *args, &exe
name = "__meth_#{exe.object_id}"
define_singleton_method name, &exe
@stack.push [code % name]+args
@stack.push code % name
self
end
@ -41,6 +41,6 @@ class Functional
def each &exe
return self unless exe
@obj.send @func || :each, *@args, &eval( "lambda{|value|#{@stack.join( ";")};exe.call(value)}")
@obj.send @func||:each, *@args, &eval( "lambda{|value|#{@stack.join ";"};exe.call(value)}")
end
end