Граф коммитов

8739 Коммитов

Автор SHA1 Сообщение Дата
aycabta 24fcbc92b4 [ruby/irb] Version 1.2.8
https://github.com/ruby/irb/commit/bcd96834c7
2020-12-20 16:23:59 +09:00
aycabta a7cacd33cc [ruby/reline] Version 0.1.10
https://github.com/ruby/reline/commit/723c6e191a
2020-12-20 16:23:59 +09:00
aycabta 9f08e3c703 [ruby/irb] Add measure command
You can use "measure" command to check performance in IRB like below:

  irb(main):001:0> 3
  => 3
  irb(main):002:0> measure
  TIME is added.
  => nil
  irb(main):003:0> 3
  processing time: 0.000058s
  => 3
  irb(main):004:0> measure :off
  => nil
  irb(main):005:0> 3
  => 3

You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also,
set custom performance check method:

  IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &block|
    time = Time.now
    result = block.()
    now = Time.now
    puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE]
    result
  }

https://github.com/ruby/irb/commit/3899eaf2e2
2020-12-20 16:23:59 +09:00
aycabta 8b6aaeaddf [ruby/irb] Handle rest of tokens correctly if no newline at last
https://github.com/ruby/irb/commit/f3c8edad2a
2020-12-20 16:23:58 +09:00
Kazuki Tsujimoto 67ee1cbdd5
Remove unnecessary files from .document
* ruby:ext/rbconfig/exts.mk
* ruby:ext/rbconfig/sizeof/Makefile
* ruby:ext/rbconfig/sizeof/depend
* ruby:ext/rbconfig/sizeof/mkmf.log
* ruby:ext/win32/depend
* ruby:ext/win32/exts.mk
* ruby:ext/win32/resolv/depend
* ruby:lib/racc/pre-setup
2020-12-20 16:00:13 +09:00
Hiroshi SHIBATA 349e79bae0
Try to test with rake-13.0.2 again.
[ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f.
2020-12-19 16:53:18 +09:00
aycabta c2a5594e27 [ruby/reline] Use cached prompt list when just moved the cursor
https://github.com/ruby/reline/commit/cfe619460b
2020-12-19 02:12:11 +09:00
aycabta d4257c6152 [ruby/reline] Yank by em-kill-region correctly
This closes ruby/reline#106.

https://github.com/ruby/reline/commit/2549a52e15
2020-12-19 02:12:11 +09:00
aycabta af2c81e10c [ruby/reline] Bind yank-pop correctly
https://github.com/ruby/reline/commit/3c74beac65
2020-12-19 02:12:11 +09:00
aycabta 671f2762fb [ruby/reline] Add Enumerable to KillRing for debugging
https://github.com/ruby/reline/commit/d208874152
2020-12-19 02:12:11 +09:00
aycabta dc61affd67 [ruby/reline] [ruby/irb] Call ripper only once when generating dynamic prompt
https://github.com/ruby/irb/commit/babb122a48

https://github.com/ruby/reline/commit/e6dbcb3b42
2020-12-19 02:12:11 +09:00
Hiroshi SHIBATA 0e40cc9b19 Merge RubyGems 3.2.2 and Bundler 2.2.2 2020-12-18 13:33:18 +09:00
Marc-Andre Lafortune 980f994b3b [ruby/irb] Change context-mode's default to new mode 4.
This new mode uses a copy of the TOPLEVEL_BINDING. This is compatible with refinements (contrary to mode 3), while keeping nested IRB sessions separate

https://github.com/ruby/irb/commit/25c731cb2f
2020-12-17 20:24:08 +09:00
Jeremy Evans 753222d72c [ruby/irb] Enable deprecation warnings when using -W or -w
Requested in Ruby Bug 17377

https://github.com/ruby/irb/commit/698f6eb34a
2020-12-17 20:23:49 +09:00
Nobuyoshi Nakada b5effe07bd [ruby/irb] Fixed a typo in a comment [ci skip]
https://github.com/ruby/irb/commit/ce373417f3
2020-12-17 20:22:55 +09:00
Nobuhiro IMAI cbf6a7f906 [ruby/irb] workaround for lack of tokens from `Ripper.lex`
* Fixes #38

https://github.com/ruby/irb/commit/905fb8e52e
2020-12-17 20:22:29 +09:00
Robert Schulze 422e2c7274 [ruby/reline] Use plus operator to create unfrozen string
https://github.com/ruby/reline/commit/ca274b0d37
2020-12-17 20:20:07 +09:00
aycabta cdf2790aa0 [ruby/reline] Support longer than screen height on Windows
https://github.com/ruby/reline/commit/2a97ca9362
2020-12-17 20:17:22 +09:00
aycabta 0158ba7e51 [ruby/reline] Make a log file on windows if debug env is set
https://github.com/ruby/reline/commit/dff30a2d44
2020-12-17 20:17:11 +09:00
aycabta 2b8fa78176 [ruby/reline] Support longer than screen height
https://github.com/ruby/reline/commit/e83a3de9ed
2020-12-17 20:14:59 +09:00
Yale Kozinski d597d7a8b6 Fixing glitchy kill ring behavior in irb
See https://github.com/ruby/irb/issues/85 for details
2020-12-17 20:04:42 +09:00
d-m-u ccf9da079f fix doc typo
s/it's/its
2020-12-16 23:22:15 -05:00
Hiroshi SHIBATA 2fa9f3c032 Prepare to release rubygems-3.2.1 and bundler-2.2.1 2020-12-15 10:54:09 +09:00
ima1zumi 68d3952c52 [ruby/reline] Fix breaking to input Emoji with ZWJ.
https://github.com/ruby/reline/commit/f21dfdbb11
2020-12-11 23:08:06 +09:00
Nobuyoshi Nakada 288e93bea8
Exclude parenthesized function declarations such as NORETURN
Fixes https://github.com/ruby/ruby/pull/3883
2020-12-11 13:43:18 +09:00
Kazuhiro NISHIYAMA d5dfc3f2c8
Use `abort(message)` instead of `puts` and `exit` 2020-12-10 21:06:10 +09:00
Hiroshi SHIBATA 658b4ff609
Fixed the test failures called WEBrick.new directly 2020-12-10 18:55:03 +09:00
Hiroshi SHIBATA e7433a3288 Added help message for gem i webrick in rdoc 2020-12-10 18:06:25 +09:00
Hiroshi SHIBATA 4ccc66265c Added help message for gem i webrick in gem server command 2020-12-10 18:06:25 +09:00
Hiroshi SHIBATA 880727f037 Added help message for gem i webrick in un.rb 2020-12-10 18:06:25 +09:00
Hiroshi SHIBATA 5dc786bf86 Move webrick library into internal test toolchain 2020-12-10 18:06:25 +09:00
Marc-Andre Lafortune 150dbb656d [ruby/matrix] v0.3.1 2020-12-09 02:15:41 -05:00
Marc-Andre Lafortune a7dccd08e7 [ruby/matrix] Make frozen matrices Ractor shareable 2020-12-09 02:15:41 -05:00
Marc-Andre Lafortune 6b264e833f [ruby/prime] Fix gemspec 2020-12-09 01:30:06 -05:00
Marc-Andre Lafortune b603085d2f [ruby/prime] v0.1.2 2020-12-09 00:45:56 -05:00
Marc-Andre Lafortune 1866d483dc [ruby/prime] Optimize `Integer#prime?`
Miller Rabin algorithm can be used to test primality for integers smaller than a max value "MaxMR" (~3e24)

It can be much faster than previous implementation: ~100x faster for numbers with 13 digits, at least 5 orders of magnitude for even larger numbers (previous implementation is so slow that it requires more patience than I have for more precise estimate).

Miller Rabin test becomes faster than previous implementation at somewhere in the range 1e5-1e6. It seems that the range 62000..66000 is where Miller Rabin starts being always faster, so I picked 0xffff arbitrarily; before that, or above "MaxMR", the previous implementation remains.

I compared the `faster_prime` gem too. It is slower than previous implementation up to ~1e4. After that it becomes faster and faster compared to previous implementation, but is still slower than Miller Rabin starting at ~1e5 and up to MaxMR. Thus, after this commit, builtin `Integer#prime?` will be similar or faster than `faster_prime` up to "MaxMR".

Adapted from patch of Stephen Blackstone [Feature #16468]

Benchmark results and code: https://gist.github.com/marcandre/b263bdae488e76dabdda84daf73733b9

Co-authored-by: Stephen Blackstone <sblackstone@gmail.com>
2020-12-09 00:40:09 -05:00
Hiroshi SHIBATA 473f9d2df0 Merge prepare version of Bundler 2.2.0 2020-12-08 17:30:02 +09:00
Hiroshi SHIBATA 4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +09:00
aycabta 3bf7b999e5 [ruby/reline] Editing to initial content is not just cursor moving
https://github.com/ruby/reline/commit/0a4f175b0a
2020-12-08 00:08:41 +09:00
MSP-Greg 5d07a21ccd RubyGems certs - remove AddTrust, add GlobalSign Root R3 2020-12-06 14:53:54 +13:00
Marc-Andre Lafortune a83a51932d [ruby/matrix] Optimize **
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]
2020-12-05 00:56:58 -05:00
Robert Schulze f4386413f1 Cope with frozen-string-literal
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`
2020-12-05 03:14:42 +09:00
aycabta 0cf073088e [ruby/reline] Process insertion buffer forcibly
https://github.com/ruby/reline/commit/89d49ec9e0
2020-12-05 02:58:59 +09:00
aycabta c2bd5b84d0 [ruby/reline] Support bracketed paste mode
https://github.com/ruby/reline/commit/d1a6869322
2020-12-05 02:58:59 +09:00
aycabta 7624f52757 [ruby/reline] Forced newline insertion is not just cursor moving
https://github.com/ruby/reline/commit/0e30a49d03
2020-12-05 02:58:59 +09:00
aycabta 37a574b527 [ruby/reline] Drop prompt list cache when num of lines is changed
https://github.com/ruby/reline/commit/1959e22043
2020-12-05 02:58:59 +09:00
aycabta 2910684c45 [ruby/reline] Cache dynamic prompt for 0.5sec
https://github.com/ruby/reline/commit/06b89d0e61
2020-12-05 02:58:59 +09:00
aycabta b763c5cdf0 [ruby/reline] Stop rerendering if the cursor is only moved
https://github.com/ruby/reline/commit/30e8eaf855
2020-12-05 02:58:59 +09:00
aycabta a297565a4e [ruby/reline] Split #rerender method that is too huge
https://github.com/ruby/reline/commit/d0fbc89253
2020-12-05 02:58:59 +09:00
aycabta 493f381c32 [ruby/reline] Version 0.1.9
https://github.com/ruby/reline/commit/0b1b5e77ce
2020-12-05 02:58:59 +09:00
aycabta b545ab219b [ruby/reline] Stop rerendering whole screen when adding newline at end of buffer
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
2020-12-05 02:58:59 +09:00
aycabta fb2fda9a27 [ruby/reline] Optimize regexp handling for width
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
2020-12-05 02:58:59 +09:00
aycabta 3d0bcf1cc2 [ruby/reline] Optimize ASCII character width calculation
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
2020-12-05 02:58:59 +09:00
aycabta c85035363f [ruby/reline] Key strokes like 2dl should behave d2l
Key strokes, vi arg, operator, and motion should be treated as operator, vi
arg, and motion.

https://github.com/ruby/reline/commit/d1a7e74aa4
2020-12-05 02:58:58 +09:00
manga_osyo e47e5db889 [ruby/reline] Fix crash to input `é`. refs #174
https://github.com/ruby/reline/commit/ba5e267e5f
2020-12-05 02:58:58 +09:00
aycabta ff4656ee64 [ruby/reline] Version 0.1.8
https://github.com/ruby/reline/commit/e79e402c01
2020-12-05 02:58:58 +09:00
aycabta dbfc1f30d5 [ruby/reline] Add alias vi-movement-mode to vi-command-mode for compatibility
https://github.com/ruby/reline/commit/a79c297567
2020-12-05 02:58:58 +09:00
aycabta 48742614df [ruby/reline] Move alias_method to right after original definition
https://github.com/ruby/reline/commit/b7c8b93fa9
2020-12-05 02:58:58 +09:00
aycabta 9750c27afc [ruby/reline] Call process_insert when the end of pasting plural fullwidth chars
https://github.com/ruby/reline/commit/594484d9f9
2020-12-05 02:58:58 +09:00
aycabta ba8e5f77eb [ruby/reline] Motions e, E, t, f should include a char on cursor if follows operator
https://github.com/ruby/reline/commit/86e9a76499
2020-12-05 02:58:58 +09:00
aycabta 6be3b2da19 [ruby/reline] Implement vi_yank
https://github.com/ruby/reline/commit/164aaf9a5f
2020-12-05 02:58:58 +09:00
aycabta 2dc4aca8d1 [ruby/reline] Operator with arg need to make sure that they take arg to avoid crashing
https://github.com/ruby/reline/commit/1c0c06de1f
2020-12-05 02:58:58 +09:00
aycabta 92b22db6a7 [ruby/reline] Unimplemented vi command should be no-op
https://github.com/ruby/reline/commit/abc90e6867
2020-12-05 02:58:58 +09:00
aycabta faf8f216be [ruby/reline] Keep operator proc as a local variable in the scope
The proc variable will be used later so the instance variable will be changes.

https://github.com/ruby/reline/commit/496c4361f6
2020-12-05 02:58:58 +09:00
aycabta 564aadce62 [ruby/reline] Skip em_exchange_mark without mark
https://github.com/ruby/reline/commit/abb56e5ec3
2020-12-05 02:58:58 +09:00
aycabta e6429ad047 [ruby/reline] Backspace and C-h should be unassigned on vi command mode
https://github.com/ruby/reline/commit/28f4dae020
2020-12-05 02:58:58 +09:00
aycabta 853c176ea7 [ruby/reline] Version 0.1.7
https://github.com/ruby/reline/commit/710ca23427
2020-12-05 02:58:58 +09:00
aycabta 266ffdde8e [ruby/reline] Continuous insertion buffering
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
2020-12-05 02:58:58 +09:00
Yusuke Endoh 76cac4c05a [ruby/reline] Improve the performance of `get_mbchar_width`
It is about three times faster to use one big regexp instead of
sequential matching.

https://github.com/ruby/reline/commit/e36f6c0707
2020-12-05 02:58:58 +09:00
aycabta b3e0db8060 [ruby/reline] Version 0.1.6
https://github.com/ruby/reline/commit/20a7806815
2020-12-05 02:58:58 +09:00
Yusuke Endoh 9461cceb8a [ruby/reline] Update the generator script too
https://github.com/ruby/reline/commit/8b0926820a
2020-12-05 02:58:58 +09:00
aycabta 55cc397a87 [ruby/reline] Suppress callbacks in pasting
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
2020-12-05 02:58:58 +09:00
Yusuke Endoh 6a51d393ca [ruby/reline] Improve the regexps for EastAsianWidth
A character class is about three times faster than Regexp alternatives

https://github.com/ruby/reline/commit/57c7955c55
2020-12-05 02:58:58 +09:00
aycabta 4af2e4111b [ruby/reline] Deduplicate completed items
https://github.com/ruby/reline/commit/2dabf0c786
2020-12-05 02:58:58 +09:00
aycabta e16e481385 [ruby/reline] Use yamatanooroti 0.0.6 for supporting startup_message on Windows
https://github.com/ruby/reline/commit/167423b664
2020-12-05 02:58:58 +09:00
aycabta 87f51c7e66 [ruby/reline] Use startup_option instead of startup wait
https://github.com/ruby/reline/commit/a63ce6371c
2020-12-05 02:58:58 +09:00
aycabta d5cf3fcd68 [ruby/reline] Update to Unicode 13.0.0
https://github.com/ruby/reline/commit/d49bb0aa34
2020-12-05 02:58:58 +09:00
Hiroshi SHIBATA 1cfc6e7b7a
Added dependencies for rinda 2020-12-04 20:21:41 +09:00
Jeremy Evans 6f14a30022 [ruby/logger] Consider cygwin a Windows platform
This should fix Ruby Bug 12468.

https://github.com/ruby/logger/commit/49de53d1fc
2020-12-04 20:16:00 +09:00
Masataka Pocke Kuwabara 60b57866ac [ruby/mutex_m] Fix `Mutex_m#initialize` when the super's initialize has kwargs
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>

https://github.com/ruby/mutex_m/commit/84ca1fc108
2020-12-04 19:53:16 +09:00
Jeremy Evans da126250ba [ruby/fileutils] Make mkdir_p only attempt to create necessary directories
Previously, if creating the directory directly didn't work
and the directory didn't exist, mkdir_p would create all
directories from the root.  This modifies the approach to
check whether the directory exists when walking up the
directory tree from the argument, and once you have found an
intermediate directory that exists, you only need to create
directories under it.

This approach has a couple advantages:

1) It performs better when most directories in path already exist,
and that will be true for most usage of mkdir_p, as mkdir_p is
usually called with paths where the first few directories exist
and only the last directory or last few directories do not.

2) It works in file-system access limited environments such as
when unveil(2) is used on OpenBSD.  In these environments, if
/foo/bar/baz exists and is unveiled, you can do
`mkdir /foo/bar/baz/xyz` but `mkdir /foo` and `mkdir /foo/bar` raise
Errno::ENOENT.

https://github.com/ruby/fileutils/commit/ec0c229e78
2020-12-04 19:50:26 +09:00
Marc-Andre Lafortune 1804c3368c [ruby/set] Add `Set#<=>`
https://github.com/ruby/set/commit/447974a374
2020-12-04 19:24:22 +09:00
Akinori MUSHA a3db08d7b6 [ruby/set] Remove SortedSet implementations
It required RBTree to perform decently and the external dependency was
not suitable for a standard library.  The pure ruby fallback
implementation was originally meant to be an example of how to write a
subclass of Set, and its poor performance was not suitable for use in
production.

I decided it should be distributed as an external library instead of
bundling it with Set.

https://github.com/ruby/set/commit/dfcc8e568b
2020-12-04 19:23:59 +09:00
Akinori MUSHA 46fc8d78a5 [ruby/set] Resurrect support for Ruby 2.x
In Ruby 2.x, initialize_copy does not take a freeze option.

https://github.com/ruby/set/commit/3da6c309df
2020-12-04 19:23:35 +09:00
Hiroshi SHIBATA d3c685f0b5
digest gem is available now 2020-12-03 19:17:29 +09:00
Hiroshi SHIBATA 1af8a0a95e [ruby/ipaddr] fixup 90b46678a5b09ed32612b0629b7c51c6d39a0444
https://github.com/ruby/ipaddr/commit/d2ec7cc3ee
2020-12-03 17:48:32 +09:00
Hiroshi SHIBATA e62eb9a3fa [ruby/ipaddr] Relaxed Ruby version for 3.0
https://github.com/ruby/ipaddr/commit/90b46678a5
2020-12-03 17:37:31 +09:00
Samuel Williams d65621b636
Specify minimum version. 2020-12-03 17:37:08 +09:00
Hiroshi SHIBATA ca024beeba
Use Gemfile instead of Gem::Specification#add_development_dependency. 2020-12-03 17:36:39 +09:00
Samuel Williams 7b126a82a9
Simplify `ipaddr.gemspec`. 2020-12-03 17:35:30 +09:00
Marc-Andre Lafortune ab524dfdd9
[ruby/forwardable] Specify minimum Ruby version.
Remove jruby-9.1.17.0 from CI

https://github.com/ruby/forwardable/commit/08d92a9c39
2020-12-03 17:35:29 +09:00
Hiroshi SHIBATA 28001e55b3
Added dependencies for net-pop 2020-12-02 19:36:06 +09:00
Hiroshi SHIBATA 1fa3f9a1b5
Added dependencies for net-imap 2020-12-02 19:36:06 +09:00
Hiroshi SHIBATA 7172272c4c
Added dependencies for net-ftp 2020-12-02 09:12:26 +09:00
Hiroshi SHIBATA afba96f9f5
Added dependencies for net-http 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA 48149d8fe7
Added dependencies for net-smtp 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA b0f4cccfae
Added dependencies for net-protocol 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA f8435f424b
Added dependencies for tmpdir 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA 10d6a27334
Added dependencies for erb 2020-12-02 09:12:25 +09:00
Hiroshi SHIBATA c364865bdf
Added dependencies for pp 2020-12-02 09:12:25 +09:00