From bb122811640db5ab307805f81cf6b5ccdd6a2f4d Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 20 Dec 2021 14:44:26 +0900 Subject: [ruby/reline] Add an assertion for overwriting dialog proc with the same name https://github.com/ruby/reline/commit/96067bc13c --- test/reline/test_reline.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/reline') diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index 1d016cf37f..a0ea43b2ad 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -316,6 +316,11 @@ class Reline::Test < Reline::TestCase d = Reline.dialog_proc(:test_proc) assert_equal(dummy_proc, d.dialog_proc) + dummy_proc_2 = proc {} + Reline.add_dialog_proc(:test_proc, dummy_proc_2) + d = Reline.dialog_proc(:test_proc) + assert_equal(dummy_proc_2, d.dialog_proc) + l = lambda {} Reline.add_dialog_proc(:test_lambda, l) d = Reline.dialog_proc(:test_lambda) -- cgit v1.2.1