aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Moved update-bundled_gems code to a toolNobuyoshi Nakada2020-12-062-10/+14
|
* Mentioned numbered parameter assignment is a SyntaxError in NEWS [ci skip]Jeremy Evans2020-12-051-1/+4
| | | | Requested by Junichi Ito.
* RubyGems certs - remove AddTrust, add GlobalSign Root R3MSP-Greg2020-12-062-25/+21
|
* Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita2020-12-063-12/+17
| | | | | | Previously, rb_getaddrinfo_a_before_exec() is called from before_exec(). However, the function needs to be called only before fork(). The change moves it to before_fork().
* * 2020-12-06 [ci skip]git2020-12-061-1/+1
|
* Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()Masaki Matsushita2020-12-061-1/+4
| | | | | After 94d49ed31c, TestSocket#test_getaddrinfo_after_fork fails in some platforms. To avoid this, the change extends sleep time to 1.5 second.
* Wrap SortedSet with `ruby_version_is ""..."3.0"`Benoit Daloze2020-12-0544-549/+681
| | | | * Using $ spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.0"' spec/ruby/library/set/sortedset/**/*_spec.rb
* Add MSpec tool to automatically wrap spec files with a guardBenoit Daloze2020-12-051-0/+28
|
* Revert "SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2"Benoit Daloze2020-12-0552-0/+939
| | | | | * This reverts commit b06ffce4aef002dc47c3c5968181230e7ab8d7cc. * Do not revert specs, wrap them with `ruby_version_is` (tool for that in next commit).
* Reduce timeout of test_getaddrinfo_after_forkMasaki Matsushita2020-12-051-1/+1
|
* Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada2020-12-055-8/+8
|
* [ruby/matrix] Optimize **Marc-Andre Lafortune2020-12-052-15/+44
| | | | | | | Avoiding recursive call would imply iterating bits starting from most significant, which is not easy to do efficiently. Any saving would be dwarfed by the multiplications anyways. [Feature #15233]
* Proposed method for dealing with stack locals which have non-local lifetime.Samuel Williams2020-12-054-51/+76
|
* Rework the order of operations to avoid stack smashing.Samuel Williams2020-12-051-19/+40
|
* Cope with frozen-string-literalRobert Schulze2020-12-051-1/+1
| | | | | | | When running irb 1.2.1 (2019-12-24) with frozen-string-literal enabled, it crashes in reline with `can't modify frozen String (FrozenError)` Steps to reproduce: `RUBYOPT="--enable-frozen-string-literal" irb`
* [ruby/reline] Process insertion buffer forciblyaycabta2020-12-052-4/+5
| | | | https://github.com/ruby/reline/commit/89d49ec9e0
* [ruby/reline] Support bracketed paste modeaycabta2020-12-054-4/+74
| | | | https://github.com/ruby/reline/commit/d1a6869322
* [ruby/reline] Forced newline insertion is not just cursor movingaycabta2020-12-052-2/+21
| | | | https://github.com/ruby/reline/commit/0e30a49d03
* [ruby/reline] Drop prompt list cache when num of lines is changedaycabta2020-12-052-1/+15
| | | | https://github.com/ruby/reline/commit/1959e22043
* [ruby/reline] Cache dynamic prompt for 0.5secaycabta2020-12-051-1/+8
| | | | https://github.com/ruby/reline/commit/06b89d0e61
* [ruby/reline] Stop rerendering if the cursor is only movedaycabta2020-12-051-0/+33
| | | | https://github.com/ruby/reline/commit/30e8eaf855
* [ruby/reline] Split #rerender method that is too hugeaycabta2020-12-051-145/+167
| | | | https://github.com/ruby/reline/commit/d0fbc89253
* [ruby/reline] Version 0.1.9aycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/0b1b5e77ce
* [ruby/reline] Stop rerendering whole screen when adding newline at end of bufferaycabta2020-12-051-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rendering time in IRB has been reduced as follows: start = Time.now def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") next if l == "\n" @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end break if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end puts "Duration: #{Time.now - start} seconds" 0.33sec -> 0.22sec https://github.com/ruby/reline/commit/496c6a1892
* [ruby/reline] Optimize regexp handling for widthaycabta2020-12-051-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rendering time in IRB has been reduced as follows: start = Time.now [{"_id"=>"5f9072a4589a06d2d74b6028", "index"=>0, "guid"=>"6b3051e2-dbc7-4537-bdb9-6cd7bb5358a7", "isActive"=>true, "balance"=>"$1,442.84", "picture"=>"http://placehold.it/32x32", "age"=>34, "eyeColor"=>"blue", "name"=>{"first"=>"Ward", "last"=>"Levy"}, "company"=>"HYPLEX", "email"=>"ward.levy@hyplex.us", "phone"=>"+1 (867) 568-3319", "address"=>"867 Cobek Court, Clara, Maryland, 3254", "about"=> "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing.", "registered"=>"Monday, May 25, 2015 6:51 AM", "latitude"=>"16.001127", "longitude"=>"-72.377848", "tags"=>["dolore", "nostrud", "occaecat", "cillum", "nisi"], "range"=>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "friends"=> [{"id"=>0, "name"=>"Alison Bryant"}, {"id"=>1, "name"=>"Ester Espinoza"}, {"id"=>2, "name"=>"Sullivan Kane"}], "greeting"=>"Hello, Ward! You have 7 unread messages.", "favoriteFruit"=>"apple"}] puts "Duration: #{Time.now - start} seconds" 0.47sec -> 0.34sec start = Time.now "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing." puts "Duration: #{Time.now - start} seconds" 0.11sec -> 0.08sec start = Time.now def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") next if l == "\n" @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end break if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end puts "Duration: #{Time.now - start} seconds" 0.40sec -> 0.33sec Co-authored-by: NARUSE, Yui <naruse@airemix.jp> https://github.com/ruby/reline/commit/a9e39ddcc4
* [ruby/reline] Optimize ASCII character width calculationaycabta2020-12-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rendering time in IRB has been reduced as follows: start = Time.now [{"_id"=>"5f9072a4589a06d2d74b6028", "index"=>0, "guid"=>"6b3051e2-dbc7-4537-bdb9-6cd7bb5358a7", "isActive"=>true, "balance"=>"$1,442.84", "picture"=>"http://placehold.it/32x32", "age"=>34, "eyeColor"=>"blue", "name"=>{"first"=>"Ward", "last"=>"Levy"}, "company"=>"HYPLEX", "email"=>"ward.levy@hyplex.us", "phone"=>"+1 (867) 568-3319", "address"=>"867 Cobek Court, Clara, Maryland, 3254", "about"=> "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing.", "registered"=>"Monday, May 25, 2015 6:51 AM", "latitude"=>"16.001127", "longitude"=>"-72.377848", "tags"=>["dolore", "nostrud", "occaecat", "cillum", "nisi"], "range"=>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "friends"=> [{"id"=>0, "name"=>"Alison Bryant"}, {"id"=>1, "name"=>"Ester Espinoza"}, {"id"=>2, "name"=>"Sullivan Kane"}], "greeting"=>"Hello, Ward! You have 7 unread messages.", "favoriteFruit"=>"apple"}] puts "Duration: #{Time.now - start} seconds" 0.73sec -> 0.43sec start = Time.now "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing." puts "Duration: #{Time.now - start} seconds" 0.15sec -> 0.10sec start = Time.now def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") next if l == "\n" @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end break if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end puts "Duration: #{Time.now - start} seconds" 0.59sec -> 0.38sec Co-authored-by: NARUSE, Yui <naruse@airemix.jp> https://github.com/ruby/reline/commit/36bc9e3abb
* [ruby/reline] Key strokes like 2dl should behave d2laycabta2020-12-052-6/+13
| | | | | | | Key strokes, vi arg, operator, and motion should be treated as operator, vi arg, and motion. https://github.com/ruby/reline/commit/d1a7e74aa4
* [ruby/reline] Add test `Reline::Unicode.test_get_mbchar_width`.manga_osyo2020-12-051-0/+12
| | | | https://github.com/ruby/reline/commit/301e9048fc
* [ruby/reline] Fix crash to input `é`. refs #174manga_osyo2020-12-051-0/+4
| | | | https://github.com/ruby/reline/commit/ba5e267e5f
* [ruby/reline] Version 0.1.8aycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/e79e402c01
* [ruby/reline] Add alias vi-movement-mode to vi-command-mode for compatibilityaycabta2020-12-052-0/+15
| | | | https://github.com/ruby/reline/commit/a79c297567
* [ruby/reline] Move alias_method to right after original definitionaycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/b7c8b93fa9
* [ruby/reline] Call process_insert when the end of pasting plural fullwidth charsaycabta2020-12-055-1/+72
| | | | https://github.com/ruby/reline/commit/594484d9f9
* [ruby/reline] Motions e, E, t, f should include a char on cursor if follows ↵aycabta2020-12-052-22/+122
| | | | | | operator https://github.com/ruby/reline/commit/86e9a76499
* [ruby/reline] Implement vi_yankaycabta2020-12-052-0/+26
| | | | https://github.com/ruby/reline/commit/164aaf9a5f
* [ruby/reline] Operator with arg need to make sure that they take arg to ↵aycabta2020-12-052-1/+14
| | | | | | avoid crashing https://github.com/ruby/reline/commit/1c0c06de1f
* [ruby/reline] Unimplemented vi command should be no-opaycabta2020-12-052-2/+15
| | | | https://github.com/ruby/reline/commit/abc90e6867
* [ruby/reline] Keep operator proc as a local variable in the scopeaycabta2020-12-052-1/+15
| | | | | | The proc variable will be used later so the instance variable will be changes. https://github.com/ruby/reline/commit/496c4361f6
* [ruby/reline] Skip em_exchange_mark without markaycabta2020-12-052-0/+21
| | | | https://github.com/ruby/reline/commit/abb56e5ec3
* [ruby/reline] Backspace and C-h should be unassigned on vi command modeaycabta2020-12-051-2/+2
| | | | https://github.com/ruby/reline/commit/28f4dae020
* [ruby/reline] Version 0.1.7aycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/710ca23427
* [ruby/reline] Continuous insertion bufferingaycabta2020-12-051-24/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rendering time in IRB has been reduced as follows: start = Time.now [{"_id"=>"5f9072a4589a06d2d74b6028", "index"=>0, "guid"=>"6b3051e2-dbc7-4537-bdb9-6cd7bb5358a7", "isActive"=>true, "balance"=>"$1,442.84", "picture"=>"http://placehold.it/32x32", "age"=>34, "eyeColor"=>"blue", "name"=>{"first"=>"Ward", "last"=>"Levy"}, "company"=>"HYPLEX", "email"=>"ward.levy@hyplex.us", "phone"=>"+1 (867) 568-3319", "address"=>"867 Cobek Court, Clara, Maryland, 3254", "about"=> "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing.", "registered"=>"Monday, May 25, 2015 6:51 AM", "latitude"=>"16.001127", "longitude"=>"-72.377848", "tags"=>["dolore", "nostrud", "occaecat", "cillum", "nisi"], "range"=>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "friends"=> [{"id"=>0, "name"=>"Alison Bryant"}, {"id"=>1, "name"=>"Ester Espinoza"}, {"id"=>2, "name"=>"Sullivan Kane"}], "greeting"=>"Hello, Ward! You have 7 unread messages.", "favoriteFruit"=>"apple"}] puts "Duration: #{Time.now - start} seconds" 2.17sec -> 0.92sec start = Time.now "Exercitation eu ex aliqua sit. Pariatur aliquip incididunt sint id non consectetur ullamco Lorem ea mollit duis amet sint labore. Commodo laborum labore commodo officia in cillum adipisicing esse excepteur cupidatat adipisicing ut. Non esse incididunt voluptate aliquip cillum eu aute duis laboris sit et. Amet enim quis tempor occaecat excepteur exercitation excepteur deserunt amet cillum adipisicing." puts "Duration: #{Time.now - start} seconds" 1.57sec -> 0.22sec start = Time.now def each_top_level_statement initialize_input catch(:TERM_INPUT) do loop do begin prompt unless l = lex throw :TERM_INPUT if @line == '' else @line_no += l.count("\n") next if l == "\n" @line.concat l if @code_block_open or @ltype or @continue or @indent > 0 next end end if @line != "\n" @line.force_encoding(@io.encoding) yield @line, @exp_line_no end break if @io.eof? @line = '' @exp_line_no = @line_no @indent = 0 rescue TerminateLineInput initialize_input prompt end end end end puts "Duration: #{Time.now - start} seconds" 0.88sec -> 0.77sec https://github.com/ruby/reline/commit/7d87ac5a12
* [ruby/reline] Improve the performance of `get_mbchar_width`Yusuke Endoh2020-12-052-28/+38
| | | | | | | It is about three times faster to use one big regexp instead of sequential matching. https://github.com/ruby/reline/commit/e36f6c0707
* [ruby/reline] Version 0.1.6aycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/20a7806815
* [ruby/reline] Update the generator script tooYusuke Endoh2020-12-051-6/+6
| | | | https://github.com/ruby/reline/commit/8b0926820a
* [ruby/reline] Suppress callbacks in pastingaycabta2020-12-055-2/+58
| | | | | | | | IRB uses Reline's 3 dynamic real-time callbacks with calling Ripper; output_modifier_proc, prompt_proc, and auto_indent_proc. These processing times make the paste time too long. https://github.com/ruby/reline/commit/beec3399a8
* [ruby/reline] Bypass newline insertion at eol on command promptaycabta2020-12-051-21/+21
| | | | | | | A newline is automatically inserted if a character is rendered at eol on command prompt. https://github.com/ruby/reline/commit/2dfd5d0df8
* [ruby/reline] Improve the regexps for EastAsianWidthYusuke Endoh2020-12-051-1148/+1148
| | | | | | A character class is about three times faster than Regexp alternatives https://github.com/ruby/reline/commit/57c7955c55
* [ruby/reline] Deduplicate completed itemsaycabta2020-12-052-1/+31
| | | | https://github.com/ruby/reline/commit/2dabf0c786
* [ruby/reline] Use yamatanooroti 0.0.6 for supporting startup_message on Windowsaycabta2020-12-051-1/+1
| | | | https://github.com/ruby/reline/commit/167423b664