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

64087 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 23f9447429 show ractor info on non-single ractor mode
Without this patch, Ruby doesn't show ractor's information when
there is only 1 ractor. However it is hard to read the log when
some ractors are created and terminated. This patch makes to keep
showing ractor's information on multi-ractor mode.
2020-12-07 08:28:36 +09:00
Koichi Sasada 307732ccee cancel theap on multi-ractors
accessing theap needs complicating synchronization but it reduce
performance on multi-ractor mode. So simply stop using theap
on multi-ractor mode. In future, theap should be replaced with
more cleaver memory strategy.
2020-12-07 08:28:36 +09:00
Koichi Sasada b67b24d0f5 ruby_single_main_ractor for single ractor mode
ruby_multi_ractor was a flag that indicates the interpreter doesn't
make any additional ractors (single ractor mode).
Instead of boolean flag, ruby_single_main_ractor pointer is introduced
which keeps main ractor's pointer if single ractor mode. If additional
ractors are created, ruby_single_main_ractor becomes NULL.
2020-12-07 08:28:36 +09:00
Kenta Murata 60eabb1aa7
Revert "memory_view.c: Add rb_memory_view_extract_item_members"
This reverts the following three commits.

- ce707079c1
- 1a76bb56b0
- 51500eedef
2020-12-07 00:38:19 +09:00
git f9fd99e601 * 2020-12-07 [ci skip] 2020-12-07 00:19:45 +09:00
Kenta Murata ce707079c1
memory_view.c: suppress uninitialized warning 2020-12-07 00:19:25 +09:00
Nobuyoshi Nakada e427c5cc2a
Update rbs 2020-12-06 23:48:03 +09:00
Kenta Murata 1a76bb56b0
memory_view.c: Fix the argument type of rb_memory_view_extract_item_members 2020-12-06 23:24:45 +09:00
Kenta Murata 51500eedef
memory_view.c: Add rb_memory_view_extract_item_members 2020-12-06 22:46:06 +09:00
Nobuyoshi Nakada 14580ebef9
Update rbs 2020-12-06 22:19:36 +09:00
Nobuyoshi Nakada 3184cd85c7
Updated bundled gems 2020-12-06 16:11:10 +09:00
Nobuyoshi Nakada e4e2a33560
update-bundled_gems: support recent format, keep the tag to test 2020-12-06 16:11:10 +09:00
Nobuyoshi Nakada ea9f16a27f
update-bundled_gems: chomp ".git" suffix from the source code URI 2020-12-06 16:11:09 +09:00
Nobuyoshi Nakada 967ed35bbb
Moved update-bundled_gems code to a tool 2020-12-06 16:11:09 +09:00
Jeremy Evans 18b2ce11b5 Mentioned numbered parameter assignment is a SyntaxError in NEWS [ci skip]
Requested by Junichi Ito.
2020-12-05 22:31:52 -08:00
MSP-Greg 5d07a21ccd RubyGems certs - remove AddTrust, add GlobalSign Root R3 2020-12-06 14:53:54 +13:00
Masaki Matsushita 76439eee68 Call cleanup function for getaddrinfo_a(3) only before fork()
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 01:32:43 +09:00
git a38d447356 * 2020-12-06 [ci skip] 2020-12-06 01:05:14 +09:00
Masaki Matsushita c56a1c1953 Extend sleep time to 1.5 second in rb_getaddrinfo_a_before_exec()
After 94d49ed31c, TestSocket#test_getaddrinfo_after_fork fails in some
platforms. To avoid this, the change extends sleep time to 1.5 second.
2020-12-06 01:01:13 +09:00
Benoit Daloze 9dbb2bfd73 Wrap SortedSet with `ruby_version_is ""..."3.0"`
* Using $ spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.0"' spec/ruby/library/set/sortedset/**/*_spec.rb
2020-12-05 11:40:00 +01:00
Benoit Daloze bb3d705819 Add MSpec tool to automatically wrap spec files with a guard 2020-12-05 11:39:33 +01:00
Benoit Daloze d0bd43c332 Revert "SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2"
* This reverts commit b06ffce4ae.
* Do not revert specs, wrap them with `ruby_version_is` (tool for that in next commit).
2020-12-05 11:17:22 +01:00
Masaki Matsushita 5e58a9033f Reduce timeout of test_getaddrinfo_after_fork 2020-12-05 17:43:35 +09:00
Nobuyoshi Nakada d2b7e1e4b2
Protoized old pre-ANSI K&R style definitions 2020-12-05 14:57:31 +09: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
Samuel Williams 3b5b309b7b Proposed method for dealing with stack locals which have non-local lifetime. 2020-12-05 11:38:56 +13:00
Samuel Williams 15e23312f6 Rework the order of operations to avoid stack smashing. 2020-12-05 11:38:56 +13: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 21f26018d2 [ruby/reline] Add test `Reline::Unicode.test_get_mbchar_width`.
https://github.com/ruby/reline/commit/301e9048fc
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