From ad6f52e7f2c59581c5e4a6a0d6ff869739d17bd4 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Mon, 19 Apr 2010 23:01:42 +0200 Subject: [PATCH] no args on stack --- lib/functional.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functional.rb b/lib/functional.rb index dce2126..3d71850 100644 --- a/lib/functional.rb +++ b/lib/functional.rb @@ -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