[前][次][番号順一覧][スレッド一覧]

ruby-changes:58752

From: osyo-manga <ko1@a...>
Date: Tue, 12 Nov 2019 21:04:41 +0900 (JST)
Subject: [ruby-changes:58752] fe45bee093 (master): Reline#readline and Reline#readmultiline to private.

https://git.ruby-lang.org/ruby.git/commit/?id=fe45bee093

From fe45bee09312a233466171f40d6826e5e4f1f2f0 Mon Sep 17 00:00:00 2001
From: osyo-manga <manga.osyo@g...>
Date: Sun, 10 Nov 2019 16:00:41 +0900
Subject: Reline#readline and Reline#readmultiline to private.


diff --git a/lib/reline.rb b/lib/reline.rb
index f5c0f5e..58a03f8 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -348,6 +348,7 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L348
   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 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L376
 
   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 e5c7f52..e88aeee 100644
--- a/test/reline/test_reline.rb
+++ b/test/reline/test_reline.rb
@@ -217,11 +217,15 @@ class Reline::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_reline.rb#L217
   end
 
   def test_readmultiline
-    # TODO
+    # readmultiline is module function
+    assert_equal(Reline.methods.include?(:readmultiline), true)
+    assert_equal(Reline.private_instance_methods.include?(:readmultiline), true)
   end
 
   def test_readline
-    # TODO
+    # readline is module function
+    assert_equal(Reline.methods.include?(:readline), true)
+    assert_equal(Reline.private_instance_methods.include?(:readline), true)
   end
 
   def test_inner_readline
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]