Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reline#readline and Reline#readmultiline to private. #67

Merged
merged 2 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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