summaryrefslogtreecommitdiff
path: root/lib/irb/inspector.rb
AgeCommit message (Collapse)Author
2025-01-24Migrate irb and reline to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12624
2025-01-22[ruby/irb] Show a quick preview of inspect result before pagertomoya ishida
launch (https://github.com/ruby/irb/pull/1040) * Quickly show inspect preview even if pretty_print takes too much time * Show a message "Inspecting..." while generating pretty_print content * Update inspecting message Co-authored-by: Stan Lo <[email protected]> * Update rendering test for preparing inspect message * Don't show preview if pretty_print does not take time --------- https://github.com/ruby/irb/commit/03c36586e6 Co-authored-by: Stan Lo <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/12612
2025-01-22[ruby/irb] Add copy command (https://github.com/ruby/irb/pull/1044)Prajjwal Singh
Closes https://github.com/ruby/irb/pull/753 https://github.com/ruby/irb/commit/a24ac53d48 Notes: Merged: https://github.com/ruby/ruby/pull/12612
2024-07-16[ruby/irb] Group class methods under `class << self`Stan Lo
(https://github.com/ruby/irb/pull/981) https://github.com/ruby/irb/commit/cdaa356df2
2024-02-23[ruby/irb] Remove remaining `frozen_string_literal: false` in lib/tomoya ishida
(https://github.com/ruby/irb/pull/883) https://github.com/ruby/irb/commit/4bfdb23ae6
2024-02-01[ruby/irb] Add rubocop with a few basic styling rulesStan Lo
(https://github.com/ruby/irb/pull/849) * Use rubocop to enforce a few styling rules * Add a CI job for linting https://github.com/ruby/irb/commit/4f60cd88bb
2023-04-05[ruby/irb] Drop Ruby 2.6 supportStan Lo
(https://github.com/ruby/irb/pull/555) * Remove all Ruby 2.6 support * Drop Ruby 2.6 specific testing conditions * Only run Ruby 2.7+ on CI * Bump Ruby requirement to 2.7+ https://github.com/ruby/irb/commit/3f714b616c
2023-02-27[ruby/irb] Provide more useful message whenStan Lo
`IRB::Inspector#inspect_value` errors (https://github.com/ruby/irb/pull/511) **Before** ``` irb(main):001:0> c = Cat.new "foo" (Object doesn't support #inspect) => ``` **After** ``` irb(main):001:0> c = Cat.new "foo" An error occurred when inspecting the object: #<NoMethodError: undefined method `is_a?' for foo:Cat if obj.is_a?(String) ^^^^^^> Result of Kernel#inspect: #<Cat:0x0000000109090d80 @name="foo"> => ```
2023-01-11[ruby/irb] Formatting to header stylesHiroshi SHIBATA
https://github.com/ruby/irb/commit/cef125850d
2023-01-11[ruby/irb] Removed Release Version and Revisions for old VCS softwareHiroshi SHIBATA
https://github.com/ruby/irb/commit/07fae94862
2022-06-28[ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)Stan Lo
* Use colorable: argument as the only coloring control * Centalize color controling logic at Color.colorable? There are 2 requirements for coloring output: 1. It's supported on the platform 2. The user wants it: `IRB.conf[:USE_COLORIZE] == true` Right now we check 1 and 2 separately whenever we colorize things. But it's error-prone because while 1 is the default of `colorable` parameter, 2 always need to manually checked. When 2 is overlooked, it causes issues like https://github.com/ruby/irb/pull/362 And there's 0 case where we may want to colorize even when the user disables it. So I think we should merge 2 into `Color.colorable?` so it can be automatically picked up. * Add tests for all inspect modes * Simplify inspectors' coloring logic * Replace use_colorize? with Color.colorable? * Remove Context#use_colorize cause it's redundant https://github.com/ruby/irb/commit/1c53023ac4
2022-01-17[ruby/irb] Use require_relative to require lib filesst0012
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
2021-01-07[ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.ppTakashi Kokubun
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
2021-01-08[ruby/irb] refactoring an error handling in `IRB::Inspector`Nobuhiro IMAI
* moved rescue clause to `#inspect_value` to catch all failures in inspectors * test with all (currently five kind of) inspect modes - tweaked the input due to only `Marshal` can inspect(dump) a `BasicObject` https://github.com/ruby/irb/commit/9d112fab8e
2020-12-28[ruby/irb] Enhance colored inspect outputTakashi Kokubun
https://github.com/ruby/irb/commit/dffcdb5269
2020-08-28[ruby/irb] Discard newlines at end of fileaycabta
https://github.com/ruby/irb/commit/0b2773d91d
2020-07-22[ruby/irb] Fix error when `inspect` is called but not found in inspectorMasataka Pocke Kuwabara
https://github.com/ruby/irb/commit/ce6d53e6d9
2019-05-21Add --colorize and --nocolorize options to IRBaycabta
2019-04-26Colorize IRB's inspect resultTakashi Kokubun
Closes: https://github.com/ruby/ruby/pull/2150
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09* lib/irb.rb: removed commented-out code.hsbt
* lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30* lib/irb/inspector.rb: [DOC] Fix typo (s/dependant/dependent/)a_matsuda
* lib/irb/workspace.rb: [DOC] Fix typo (s/binging/binding/) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-26 * lib/irb/context.rb: fix IRB::Inspector#keys_with_inspector [Bug #7598]keiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and zzak
class methods to IRB::Inspector [ruby-core:51067][Bug #7598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* lib/irb.rb, lib/irb/*: Documentation for IRBzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13* lib/irb*: merge doc from doc/irb/ird.rd and improve overallzzak
documentation of IRB * doc/irb/irb.rd: remove stale documentation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07* lib/irb/inspector.rb (IRB::INSPECTORS.def_inspector): supportmatz
object without #inspect defined. a patch from Daniel Bovensiepen. [ruby-core:25200] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-08 * lib/irb/inspector.rb: forget svn add.keiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e