summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-03-19 19:08:39 -0700
committergit <svn-admin@ruby-lang.org>2021-03-20 20:25:32 +0900
commit278522f0535d081ff6473f210cb45f923ff8810a (patch)
tree80ac90fdfc35677accc8906665ad66b3f219549c /test
parente019dd24df4ed7063ad80d4c2e4070141793f598 (diff)
[ruby/irb] Don't call Ruby 2.4+'s String#pretty_print
https://github.com/ruby/irb/commit/89bcf107be
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_color_printer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/irb/test_color_printer.rb b/test/irb/test_color_printer.rb
index 1b28837658..1afc7ccf55 100644
--- a/test/irb/test_color_printer.rb
+++ b/test/irb/test_color_printer.rb
@@ -34,6 +34,7 @@ module TestIRB
end
{
1 => "#{BLUE}#{BOLD}1#{CLEAR}\n",
+ "a\nb" => %[#{RED}#{BOLD}"#{CLEAR}#{RED}a\\nb#{CLEAR}#{RED}#{BOLD}"#{CLEAR}\n],
IRBTestColorPrinter.new('test') => "#{GREEN}#<struct TestIRB::TestColorPrinter::IRBTestColorPrinter#{CLEAR} a#{GREEN}=#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{RED}test#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{GREEN}>#{CLEAR}\n",
Ripper::Lexer.new('1').scan => "[#{GREEN}#<Ripper::Lexer::Elem:#{CLEAR} on_int@1:0 END token: #{RED}#{BOLD}\"#{CLEAR}#{RED}1#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{GREEN}>#{CLEAR}]\n",
Class.new{define_method(:pretty_print){|q| q.text("[__FILE__, __LINE__, __ENCODING__]")}}.new => "[#{CYAN}#{BOLD}__FILE__#{CLEAR}, #{CYAN}#{BOLD}__LINE__#{CLEAR}, #{CYAN}#{BOLD}__ENCODING__#{CLEAR}]\n",