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