aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/color_printer.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/irb] Replace METHOD_IS_A with ===Stan Lo2023-03-131-2/+1
| | | | | | (https://github.com/ruby/irb/pull/542) https://github.com/ruby/irb/commit/edd6c30e16
* [ruby/irb] Support inspecting BasicObjectStan Lo2023-03-131-1/+7
| | | | | | (https://github.com/ruby/irb/pull/541) https://github.com/ruby/irb/commit/1dc2a406a3
* [ruby/irb] shortcut colorize_code to speedup pretty_printtompng2022-08-041-0/+3
| | | | https://github.com/ruby/irb/commit/8a074a6904
* [ruby/irb] Use require_relative to require lib filesst00122022-01-171-1/+1
| | | | | | | | | 1. `require` can mislead Ruby to load system irb's files and cause constant redefined warnings as other code loads the same module/class from lib folder. 2. Most files already use `require_relative`. https://github.com/ruby/irb/commit/848d339f2e
* [ruby/irb] Don't call Ruby 2.4+'s String#pretty_printTakashi Kokubun2021-03-201-0/+9
| | | | https://github.com/ruby/irb/commit/89bcf107be
* [ruby/irb] Rescue Errno::EINVAL on IRB ppTakashi Kokubun2021-01-191-5/+15
| | | | | | | | | | | | | | http://rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20210119T070008Z.log.html.gz is caused by: /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline/ansi.rb:157:in `winsize': Invalid argument - <STDIN> (Errno::EINVAL) from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline/ansi.rb:157:in `get_screen_size' from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/reline.rb:168:in `get_screen_size' from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/forwardable.rb:238:in `get_screen_size' from /export/home/chkbuild/chkbuild-gcc/tmp/build/20210119T150010Z/ruby/lib/irb/color_printer.rb:7:in `pp' from -e:1:in `<main>' https://github.com/ruby/irb/commit/1719514598
* [ruby/irb] Use a real screen size for pp by defaultTakashi Kokubun2021-01-181-1/+1
| | | | https://github.com/ruby/irb/commit/9b9300dec2
* [ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.ppTakashi Kokubun2021-01-071-1/+1
| | | | | | | | | The incompatible interface is not helpful, again if you want to use it as a standalone library, falling it back to PP. Original PP.pp also ends with `out << "\n"`. https://github.com/ruby/irb/commit/4c74c7d84c
* [ruby/irb] Add missing requireTakashi Kokubun2021-01-071-0/+1
| | | | | | | | | | | | | | | This is useful if you want to use IRB::ColorPrinter as a library like: ``` begin require 'irb/color_printer' IRB::ColorPrinter.pp(obj) rescue LoadError pp(obj) end ``` https://github.com/ruby/irb/commit/f8461691c7
* [ruby/irb] Stringify when a non-object is passed to PP#textaycabta2021-01-041-1/+6
| | | | | | | | | | | | | | If a nested object is passed to #pp, it may be sometimes passed to the #text method as an object without being stringified. This is fixed on the Ruby main repository; https://github.com/ruby/ruby/commit/433a3be86a811de0b4adbb92e054ee3a6fc6b4d8 but it was a bug of Ripper so still needs this workaround for using irb as a gem on Ruby 3.0.0 or earlier. Co-authored-by: k0kubun <takashikkbn@gmail.com> https://github.com/ruby/irb/commit/8d13df22ee
* [ruby/irb] Enhance colored inspect outputTakashi Kokubun2020-12-281-0/+22
https://github.com/ruby/irb/commit/dffcdb5269