From 29e7a0e4e222569000795d41de185cd0c0d72097 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Thu, 24 Nov 2011 11:50:08 +0100 Subject: [PATCH 1/6] ignore pkg-dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6f69607..8146014 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ functional.gemspec +pkg From 53033b8cdd09897ae510bf9700b07523e7319d67 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 16 Dec 2011 11:22:48 +0100 Subject: [PATCH 2/6] bugfixes; tap. v0.1.4 --- VERSION | 2 +- lib/functional.rb | 58 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/VERSION b/VERSION index b1e80bb..845639e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.3 +0.1.4 diff --git a/lib/functional.rb b/lib/functional.rb index 4d2142c..715db4d 100644 --- a/lib/functional.rb +++ b/lib/functional.rb @@ -47,6 +47,7 @@ class Counter end class Functional + def self.__version__() '0.1.4' end include Enumerable class DEFAULT @@ -161,6 +162,11 @@ class Functional end class Each Date: Fri, 16 Dec 2011 11:42:45 +0100 Subject: [PATCH 3/6] tests added --- test/functional_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/functional_test.rb diff --git a/test/functional_test.rb b/test/functional_test.rb new file mode 100644 index 0000000..20aa11e --- /dev/null +++ b/test/functional_test.rb @@ -0,0 +1,14 @@ +require 'test/unit' +require 'functional' + +class FunTest < Test::Unit::TestCase + def test_to_fun_exists + assert_respond_to Object, :to_fun + end + + def test_to_fun_to_a + assert_equal (0..100).to_a, (0..100).to_fun.to_a + end + + +end From 99a268a89df5e61cea9abecc8ed37432d82e9c42 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 16 Dec 2011 12:45:22 +0100 Subject: [PATCH 4/6] more tests --- test/functional_test.rb | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/test/functional_test.rb b/test/functional_test.rb index 20aa11e..9497c66 100644 --- a/test/functional_test.rb +++ b/test/functional_test.rb @@ -2,13 +2,28 @@ require 'test/unit' require 'functional' class FunTest < Test::Unit::TestCase + M = 0..100 + + def doit_fun m, &exe + f = m.to_fun + yield f + f.to_a + end + def test_to_fun_exists assert_respond_to Object, :to_fun end - def test_to_fun_to_a - assert_equal (0..100).to_a, (0..100).to_fun.to_a + def test_to_a + assert_equal M.to_a, doit_fun( M) {|x| x } end - + def test_collect + l = lambda {|x| x*2} + assert_equal M.collect( &l), doit_fun( M) {|x| x.collect( &l) } + end + + def test_inject + assert_equal M.inject( 0) {|i,j| i+j }, M.to_fun.inject( 0) {|i,j| i+j } + end end From 145129641db7eddaf34022cc8ec490bf39e0c923 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 16 Dec 2011 12:45:52 +0100 Subject: [PATCH 5/6] v0.1.5 --- VERSION | 2 +- lib/functional.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 845639e..9faa1b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.4 +0.1.5 diff --git a/lib/functional.rb b/lib/functional.rb index 715db4d..f129e3d 100644 --- a/lib/functional.rb +++ b/lib/functional.rb @@ -47,7 +47,7 @@ class Counter end class Functional - def self.__version__() '0.1.4' end + def self.__version__() '0.1.5' end include Enumerable class DEFAULT From ede467e93492852712684bb1e46e7fc9ce986667 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 3 Dec 2021 18:40:08 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=E2=80=9EREADME.md=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 6cf2106..1478272 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +Obsolete +======== + +Use `#lazy`. + Install =======