From 4d94e3ec4816e5b5bdf7afb5b10867bd998b78fc Mon Sep 17 00:00:00 2001 From: akira Date: Fri, 6 Feb 2004 09:27:53 +0000 Subject: [PATCH] * test/ruby/test_proc.rb (TestProc::test_eq): added tests for Proc#==. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/test_proc.rb | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 79a2eef605..be96ace0f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 6 18:26:00 2004 akira yamada + + * test/ruby/test_proc.rb (TestProc::test_eq): added tests for + Proc#==. + Fri Feb 6 10:12:06 2004 Nobuyoshi Nakada * ext/socket/socket.c (bsock_do_not_reverse_lookup): control reverse diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 99e2a4c7e9..505048e6ee 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -68,4 +68,21 @@ class TestProc < Test::Unit::TestCase assert_arity(-1) {|*x|} assert_arity(-1) {|*|} end + + # [ruby-dev:22592] + def m(x) + lambda { x } + end + def test_eq + # [ruby-dev:22592] + a = m(1) + b = m(2) + assert_equal(false, a == b) + assert_equal(false, a.call == b.call) + + # [ruby-dev:22601] + a = lambda {|x| lambda {} }.call(1) + b = lambda {} + assert_equal(false, a == b) + end end