Age | Commit message (Collapse) | Author |
|
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
|
|
There are two directories where csv*/**/*.rb exist, lib/ and
test/, and depending on the order of tests, test/ may be placed
before lib/. In that case, as "shortest" names were not sorted,
csv/helper.rb will be the first candidate for "csv".
https://github.com/ruby/irb/commit/2af7c6bf71
|
|
https://github.com/ruby/irb/commit/005ade74dd
|
|
https://github.com/ruby/irb/commit/5e29e3e39c
|
|
https://github.com/ruby/irb/commit/4781f67fb8
|
|
https://github.com/ruby/irb/commit/ab5d84c55b
|
|
https://github.com/ruby/irb/commit/e736a77076
|
|
https://github.com/ruby/irb/commit/b12f0cb8e2
|
|
https://github.com/ruby/irb/commit/0aa2425883
|