<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/inspector.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)</title>
<updated>2022-06-28T13:30:42+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-06-28T13:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=44c1316293f80abaa0e76b3818322544b9372a97'/>
<id>44c1316293f80abaa0e76b3818322544b9372a97</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Use require_relative to require lib files</title>
<updated>2022-01-17T05:23:40+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-01-16T22:20:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=81b604fb005b2dfa9601e0dabcdacfca6d8f3fba'/>
<id>81b604fb005b2dfa9601e0dabcdacfca6d8f3fba</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.pp</title>
<updated>2021-01-08T06:43:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2021-01-08T06:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=98bd7e87a08b86c7aa95502428015c3f7b4aae75'/>
<id>98bd7e87a08b86c7aa95502428015c3f7b4aae75</id>
<content type='text'>
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 &lt;&lt; "\n"`.

https://github.com/ruby/irb/commit/4c74c7d84c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;&lt; "\n"`.

https://github.com/ruby/irb/commit/4c74c7d84c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] refactoring an error handling in `IRB::Inspector`</title>
<updated>2021-01-08T04:25:18+00:00</updated>
<author>
<name>Nobuhiro IMAI</name>
<email>nov@yo.rim.or.jp</email>
</author>
<published>2021-01-07T10:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ed3264d37abc54e3aade229751a9165ffd37ca2e'/>
<id>ed3264d37abc54e3aade229751a9165ffd37ca2e</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Enhance colored inspect output</title>
<updated>2020-12-29T07:01:00+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-12-29T06:16:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c715fb46c2d8eab48323a6008c5dbca550ebe2e0'/>
<id>c715fb46c2d8eab48323a6008c5dbca550ebe2e0</id>
<content type='text'>
https://github.com/ruby/irb/commit/dffcdb5269
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/dffcdb5269
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Discard newlines at end of file</title>
<updated>2020-08-28T02:05:18+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2020-08-26T10:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8882927036a6630c6132f0a2067bdec64d9ca94d'/>
<id>8882927036a6630c6132f0a2067bdec64d9ca94d</id>
<content type='text'>
https://github.com/ruby/irb/commit/0b2773d91d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/0b2773d91d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix error when `inspect` is called but not found in inspector</title>
<updated>2020-07-21T17:31:47+00:00</updated>
<author>
<name>Masataka Pocke Kuwabara</name>
<email>kuwabara@pocke.me</email>
</author>
<published>2020-06-10T13:01:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b40e925c92753640ae05951fe9f69604b41fab32'/>
<id>b40e925c92753640ae05951fe9f69604b41fab32</id>
<content type='text'>
https://github.com/ruby/irb/commit/ce6d53e6d9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/ce6d53e6d9
</pre>
</div>
</content>
</entry>
<entry>
<title>Add --colorize and --nocolorize options to IRB</title>
<updated>2019-05-20T23:57:21+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2019-05-15T07:36:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a9008b9845db544d0788851f9527ce9f9f6bf4a'/>
<id>3a9008b9845db544d0788851f9527ce9f9f6bf4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Colorize IRB's inspect result</title>
<updated>2019-04-25T15:47:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2019-04-25T12:36:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b55201dd099011a22c8c1d64c653f898d9b409ca'/>
<id>b55201dd099011a22c8c1d64c653f898d9b409ca</id>
<content type='text'>
Closes: https://github.com/ruby/ruby/pull/2150
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes: https://github.com/ruby/ruby/pull/2150
</pre>
</div>
</content>
</entry>
<entry>
<title>Add frozen_string_literal: false for all files</title>
<updated>2015-12-16T05:07:31+00:00</updated>
<author>
<name>naruse</name>
<email>naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-16T05:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3e92b635fb5422207b7bbdc924e292e51e21f040'/>
<id>3e92b635fb5422207b7bbdc924e292e51e21f040</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
