| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/irb/commit/8a074a6904
|
|
(https://github.com/ruby/irb/pull/377)
* Include updated help message
https://github.com/ruby/irb/commit/ff129f3794
|
|
(https://github.com/ruby/irb/pull/370)
Changed:
Added text to options that said just 'same as ruby -whatever'.
Added defaults.
Removed an errant tab.
https://github.com/ruby/irb/commit/dfe454cc33
|
|
loaded
ruby/debug uses `irb/color` selectively:
https://github.com/ruby/debug/blob/0ac22406bb8f65bc76f9f5576a00c729cac693af/lib/debug/color.rb#L4
And in that case, `IRB.conf` won't be defined. So Color.colorable? needs
to consider that.
This also fixes the Ruby trunk CI.
https://github.com/ruby/irb/commit/b2cd07e795
|
|
* 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
|
|
When outputting a (possibly truncated) value, IRB will query the
window size. However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.
This fix ensure that stdout is a TTY.
https://github.com/ruby/irb/commit/125de5eeea
|
|
(https://github.com/ruby/irb/pull/362)
https://github.com/ruby/irb/commit/534688dfc4
|
|
If this is at the top level, it stops the documentation of the
entire module, but not only the part in this file.
https://github.com/ruby/irb/commit/86c41b06ad
|
|
If you call `binding.irb` on a class defined `#print`, it will crash, so call `Kernel.print`.
Fix [Bug #18389] `binding.irb` can fail in some classes that implement `context` and `print` methods.
https://github.com/ruby/irb/commit/d54b271984
|
|
https://github.com/ruby/irb/commit/d5060f7668
|
|
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
|
|
(https://github.com/ruby/irb/pull/323)
https://github.com/ruby/irb/commit/1c03bd3373
|
|
https://github.com/ruby/irb/commit/b1d9c34441
|
|
https://github.com/ruby/irb/commit/a4b95d6634
|
|
https://github.com/ruby/irb/commit/b80ec5821e
|
|
https://github.com/ruby/irb/commit/f36ad549c4
|
|
Changed to use `#pos` `#event` `#tok` `#state` since using Lexer::Elem#[0~4] now gives a warning.
see: https://github.com/ruby/ruby/commit/8944009be7418614ce7d4077807ac2b60d4d5d85
https://github.com/ruby/reline/commit/9adbb9af32
|
|
`chcp` returns different encoding
https://github.com/ruby/irb/commit/f80971994a
|
|
https://github.com/ruby/irb/commit/4cade4b7e5
|
|
Use in_keyword_case_scope?
Return fast
https://github.com/ruby/irb/commit/8acc7f8dc7
|
|
I pushed reline#389 for when convert-meta is not turned on in .inputrc.
Alt+D in irb also needs to be set to the keycode for not using convert-meta.
https://github.com/ruby/irb/commit/328eddf851
|
|
Fix bug infinite loop when pasting multilines fo code in Ruby 2.6.
This is not reproduced in Ruby 2.7.
Changes added in https://github.com/ruby/irb/pull/242/files#diff-612b926e42ed78aed1a889ac1944f7d22229b3a489cc08f837a7f75eca3d3399R155 are also reflected in Ruby 2.6.
https://github.com/ruby/irb/commit/0a77f75bf0
|
|
Instead of accessing the struct as an array, access it via methods. There are other places inside of this file already using this API (for example https://github.com/ruby/ruby/blob/e0a5c3d2b71dfad038d7562fdd33f02ffd79232d/lib/irb/ruby-lex.rb#L829-L830).
This commit moves all struct array-ish calls to use their method calls instead. It is also ~1.23 faster accessing values via a method instead of as an array according to this microbenchmark:
```ruby
Elem = Struct.new(:pos, :event, :tok, :state, :message) do
def initialize(pos, event, tok, state, message = nil)
super(pos, event, tok, State.new(state), message)
end
# ...
def to_a
a = super
a.pop unless a.empty?
a
end
end
class ElemClass
attr_accessor :pos, :event, :tok, :state, :message
def initialize(pos, event, tok, state, message = nil)
@pos = pos
@event = event
@tok = tok
@state = State.new(state)
@message = message
end
def to_a
if @message
[@pos, @event, @tok, @state, @message]
else
[@pos, @event, @tok, @state]
end
end
end
# stub state class creation for now
class State; def initialize(val); end; end
```
```ruby
Benchmark.ips do |x|
x.report("struct") { struct[1] }
x.report("class ") { from_class.event }
x.compare!
end; nil
```
```
Warming up --------------------------------------
struct 1.624M i/100ms
class 1.958M i/100ms
Calculating -------------------------------------
struct 17.139M (± 2.6%) i/s - 86.077M in 5.025801s
class 21.104M (± 3.4%) i/s - 105.709M in 5.015193s
Comparison:
class : 21103826.3 i/s
struct: 17139201.5 i/s - 1.23x (± 0.00) slower
```
Notes:
Merged: https://github.com/ruby/ruby/pull/5093
|
|
Rename method
https://github.com/ruby/irb/commit/619aecb412
|
|
https://github.com/ruby/irb/commit/5018f2cb99
|
|
https://github.com/ruby/irb/commit/3f79cb506f
|
|
https://github.com/ruby/irb/commit/6330601629
|
|
https://github.com/ruby/irb/commit/7ee15bc668
|
|
This reverts commit 27dd2867cda5c789efaa5078214ad2fd82adcebf.
This is to fix the test I added.
(I separated commits to test a new behavior of ruby-commit-hook)
https://github.com/ruby/irb/commit/fe055d521a
|
|
https://github.com/ruby/irb/commit/49b9f644c2
|
|
https://github.com/ruby/irb/commit/4f686afbca
|
|
correctly
https://github.com/ruby/irb/commit/5df6e1f027
|
|
https://github.com/ruby/irb/commit/f34da7fa04
|
|
by using variable names
https://github.com/ruby/irb/commit/a23a88b8c9
|
|
https://github.com/ruby/irb/commit/4d7cefcaa4
|
|
From Reidline to Reline
Update description used in take_corresponding_syntax_to_kw_do and is_the_in_correspond_to_a_for methods
Use possessive noun correctly
Second element
https://github.com/ruby/irb/commit/4fa9714d6f
|
|
Fixes calling exit after binding.irb.
Fixes [Bug #18234]
https://github.com/ruby/irb/commit/4ea8d376f2
|
|
`rdoc` has been required so it looks unnecessary
https://github.com/ruby/irb/commit/5f749c613c
|
|
https://github.com/ruby/irb/commit/15bcbbb284
|
|
https://github.com/ruby/irb/commit/800e83eabd
|
|
https://github.com/ruby/irb/commit/5af637b3c1
|
|
https://github.com/ruby/irb/commit/123b7e53ee
|
|
https://github.com/ruby/irb/commit/642adbe968
|
|
https://github.com/ruby/irb/commit/973bac83ff
|
|
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.
https://github.com/ruby/irb/commit/b22094a16f
|
|
https://github.com/ruby/irb/commit/7a97bb0e56
|
|
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.
|
|
https://github.com/ruby/irb/commit/daa65cded1
|
|
|
|
Use first method instead of square brackets to support 2.5 and 2.6 versions
Use tokens
Clear check_newline_depth_difference
https://github.com/ruby/irb/commit/6fec2a5d46
|