Skip to content

Commit

Permalink
Merge pull request #67 from osyo-manga/readline-and-readmultiline-to-…
Browse files Browse the repository at this point in the history
…private

Reline#readline and Reline#readmultiline to private.
  • Loading branch information
aycabta authored Nov 11, 2019
2 parents 2a7e93f + 5ab21cd commit 8bd2a1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/reline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


#--------------------------------------------------------
Expand Down Expand Up @@ -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|
Expand Down
8 changes: 6 additions & 2 deletions test/reline/test_reline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bd2a1a

Please sign in to comment.