ruby-changes:70345
From: aycabta <ko1@a...>
Date: Mon, 20 Dec 2021 14:55:02 +0900 (JST)
Subject: [ruby-changes:70345] bb12281164 (master): [ruby/reline] Add an assertion for overwriting dialog proc with the same name
https://git.ruby-lang.org/ruby.git/commit/?id=bb12281164 From bb122811640db5ab307805f81cf6b5ccdd6a2f4d Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> 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(+) diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index 1d016cf37ff..a0ea43b2ad8 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -316,6 +316,11 @@ class Reline::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_reline.rb#L316 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/