From 476a539ff6a22db1bdd565d7e64b57ad04bc841b Mon Sep 17 00:00:00 2001 From: a_matsuda Date: Tue, 12 Dec 2017 12:12:38 +0000 Subject: Add Method#=== that invokes #call Patch by osyo via [Feature #14142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 778fcdc9bc..b3d4098a1c 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -1017,4 +1017,10 @@ class TestMethod < Test::Unit::TestCase # without trace insn assert_separately [], "RubyVM::InstructionSequence.compile_option = {trace_instruction: false}\n" + body end + + def test_eqq + assert(Method.instance_methods(false).include? :===) + assert_operator(0.method(:<), :===, 5) + assert_not_operator(0.method(:<), :===, -5) + end end -- cgit v1.2.3