aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-11-25 15:57:36 +0900
committerKoichi Sasada <ko1@atdot.net>2021-11-26 10:56:03 +0900
commite984c2a9ea29fa17c5f55d324d181f8eaa677d69 (patch)
treefdcf889e707ffe09943d0902e30ed4de9dc2c1d0 /test/ruby
parentf3320f164fd4147256227271b89e02522a536093 (diff)
downloadruby-e984c2a9ea29fa17c5f55d324d181f8eaa677d69.tar.gz
fix to choose correct callcache
It should retun general `cc`, not for overloaded (mandatory only) method call cache. This issue is reported by @shugo and @ktou https://twitter.com/shugomaeda/status/1463699797182119936
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_iseq.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index 847ce6995c..ac191531de 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -714,4 +714,11 @@ class TestISeq < Test::Unit::TestCase
RubyVM::InstructionSequence.compile("", debug_level: 5)
end;
end
+
+ def test_mandatory_only
+ assert_separately [], <<~RUBY
+ at0 = Time.at(0)
+ assert_equal at0, Time.public_send(:at, 0, 0)
+ RUBY
+ end
end