diff --git a/lib/reline.rb b/lib/reline.rb index f5c0f5ef69..58a03f882c 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -348,6 +348,7 @@ def readline(prompt = '', add_hist = false) def_single_delegators :core, :vi_editing_mode, :emacs_editing_mode def_single_delegators :core, :readline def_instance_delegators self, :readline + private :readline #-------------------------------------------------------- @@ -375,6 +376,7 @@ def self.insert_text(*args, &block) def_single_delegators :core, :readmultiline def_instance_delegators self, :readmultiline + private :readmultiline def self.core @core ||= Core.new { |core| diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index e5c7f525bf..d6c7bd0375 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -217,11 +217,15 @@ def test_editing_mode end def test_readmultiline - # TODO + # readmultiline is module function + assert_equal(true, Reline.methods.include?(:readmultiline)) + assert_equal(true, Reline.private_instance_methods.include?(:readmultiline)) end def test_readline - # TODO + # readline is module function + assert_equal(true, Reline.methods.include?(:readline)) + assert_equal(true, Reline.private_instance_methods.include?(:readline)) end def test_inner_readline