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

65416 Коммитов

Автор SHA1 Сообщение Дата
aycabta 433b975fe8 [ruby/reline] Initialize uninitialized variables in tests
https://github.com/ruby/reline/commit/25af4bb64b
2021-02-07 05:10:36 +09:00
aycabta b69c965f47 [ruby/reline] Cache pasting state in processing a key
Because it's too slow.

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.22sec -> 0.14sec

https://github.com/ruby/reline/commit/b8b3dd52c0
2021-02-07 05:09:18 +09:00
Adam Jensen 132e01a1c3 .gdbinit: Fix indentation in print_id [ci skip] 2021-02-06 13:03:40 -05:00
git bfc7bb5d8a * 2021-02-07 [ci skip] 2021-02-07 03:02:42 +09:00
Garen Torikian 34c422b678 Fix grammatical error 2021-02-06 13:02:17 -05:00
aycabta 7b354cf67b [ruby/irb] Enable to reassign a new block with "measure" command
https://github.com/ruby/irb/commit/b444573aa2
2021-02-06 21:09:31 +09:00
aycabta 5704b5fe5e [ruby/irb] Allow "measure" command to take block
https://github.com/ruby/irb/commit/20f1ca23e9
2021-02-06 20:45:08 +09:00
Masaki Matsushita e1e61e256b Improve performance of Array#- when it is called with empty array
This change make Array#- return a copy of the receiver when
the other array is empty.
2021-02-06 17:23:16 +09:00
Nobuyoshi Nakada 94fb62e4a0
[DOC] Fixed a markup in Array#sum [ci skip] 2021-02-06 13:40:50 +09:00
git 575c77ddfb * 2021-02-06 [ci skip] 2021-02-06 13:14:33 +09:00
Nobuyoshi Nakada 52ce583f52
Stop disabling firewall 2021-02-06 13:13:58 +09:00
Koichi Sasada b2674c1fd7 unblock thread is only for main ractor.
other ractors should not have a unblock thread.
This patch fixes 6f727853ce.
2021-02-05 15:33:00 +09:00
Nobuyoshi Nakada 7baedeffe9
Added tests for MakeMakefile#test_egrep_cpp 2021-02-05 13:59:27 +09:00
Nobuyoshi Nakada 0acc05caf7
Add -fdeclspec to CFLAGS instead of CC 2021-02-05 12:34:17 +09:00
Charles Oliver Nutter abf71864a5
[ruby/io-console] Mark all tests that use run_pty as pend on JRuby
JRuby's PTY.spawn does not produce a process with its own
controlling terminal, which is necessary for testing these raw
escape sequences. This commit marks those tests as pending.

The functionality tested appears to work at a command line, but
due to this PTY bug in JRuby we cannot test it this way.

See https://github.com/jruby/jruby/issues/6552

https://github.com/ruby/io-console/commit/a486b72e5e
https://github.com/ruby/io-console/commit/b5c8e7bfd8
2021-02-05 12:29:33 +09:00
Charles Oliver Nutter a1cc044ea1
[ruby/io-console] Use omit instead of skip
This test runs with test/unit now, which defines omit instead of
skip.

https://github.com/ruby/io-console/commit/bd731d0b8d
2021-02-05 12:01:38 +09:00
Charles Oliver Nutter 2a764fe764
[ruby/io-console] Skip test on JRuby
The subprocess script here works fine at a command line, but when
run as a pty subprocess during the tests the master side hangs
waiting for output.

https://github.com/ruby/io-console/commit/4a21610ece
2021-02-05 12:01:38 +09:00
Charles Oliver Nutter 8960d6b5bd
[ruby/io-console] Add console.rb to search for paths
https://github.com/ruby/io-console/commit/74567376c4
2021-02-05 12:01:38 +09:00
Nobuyoshi Nakada 9ef7780b09
[ruby/io-console] Run subprocesses without test libraries
Now io/console is loaded from test-unit indirectly, test-unit
requires power_assert which requires io/console.

https://github.com/ruby/io-console/commit/8817d07951
https://github.com/ruby/io-console/commit/639cce89de
2021-02-05 11:45:04 +09:00
Nobuyoshi Nakada fcdccbff01
travis_retry.sh is not needed on GitHub Actions
At least check_dependencies.yml has not failed here yet.
2021-02-05 10:12:17 +09:00
Jean Boussier 3a888398a6 objspace_dump.c: tag singleton classes and reference the superclass 2021-02-04 09:53:31 -08:00
git 365326a09e * 2021-02-05 [ci skip] 2021-02-05 02:49:21 +09:00
Aaron Patterson 75b96c3a05 Don't register non-heap allocated objects
`rb_define_const` can add objects as "mark objects".  This is to make
code like this work:

  33d6e92e0c/ext/etc/etc.c (L1201)

```
    rb_define_const(rb_cStruct, "Passwd", sPasswd); /* deprecated name */
```

sPasswd is a heap allocated object that is also a C global, so we can't
move it (it needs to be pinned).  However, we have many calls to
`rb_define_const` that just pass in an integer like this:

```
rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
```

Non heap allocated objects like integers will never move, so there is no
reason to waste time in the GC marking / pinning them.
2021-02-04 09:49:00 -08:00
ima1zumi b79d443482 [ruby/irb] Add info.rb to gemspec
https://github.com/ruby/irb/commit/adbba19adf
2021-02-04 21:12:54 +09:00
Yusuke Endoh f71659d47b Revert "vm_dump.c: Do not show C backtrace on riscv"
This reverts commit 6985bfb72c.

Now it should work on riscv by the previous commit. [Bug #17609]
2021-02-04 17:47:12 +09:00
Yusuke Endoh 7d22060c14 addr2line.c: DW_LNS_fixed_advance_pc takes a single uhalf operand
Fixes [Bug #17609]

Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
2021-02-04 17:45:54 +09:00
S-H-GAMELINKS 90f008f569 Remove unsued str_new_shared function declaration 2021-02-04 16:25:55 +09:00
Dimitris Zorbas 46b5b51cc6 [DOC] Fix typo in ext/socket/socket.c [ci skip] 2021-02-04 13:29:58 +09:00
Kenta Murata 4e2e1d6093
[ruby/bigdecimal] Fix uint64 conversion
Stop using logarithm to compute the number of components.
Instead, use the theoretical maximum number of components for buffer,
and count up the actual number of components during conversion.

https://github.com/ruby/bigdecimal/commit/9067b353ac
2021-02-04 13:18:58 +09:00
Kenta Murata 868d66e0b5
[ruby/bigdecimal] Stop using rmpd and RMPD prefixes and DBLE_FIG
https://github.com/ruby/bigdecimal/commit/7479923fdb
2021-02-04 13:18:52 +09:00
卜部昌平 b0d6563f13 rb_clear_method_cache_by_class: no longer exist
It is questionable whether we can change a public API but this function
does not exist today.  No way.
2021-02-04 12:34:19 +09:00
Aaron Patterson 33d6e92e0c
Revert "Don't pin `val` passed in to `rb_define_const`."
I think this is breaking something

This reverts commit 1be84e53d7.
2021-02-03 12:48:37 -08:00
git 6b4814083b * 2021-02-04 [ci skip] 2021-02-04 02:35:37 +09:00
Aaron Patterson 1be84e53d7 Don't pin `val` passed in to `rb_define_const`.
The caller should be responsible for holding a pinned reference (if they
need that)
2021-02-03 09:35:15 -08:00
Nobuyoshi Nakada 71c746379d Make alias for aliased original method
Chaining aliased methods increases searching cost linearly.
2021-02-03 19:59:35 +09:00
Kenta Murata 8df1881c8f [ruby/bigdecimal] Fix the maximum length of float number
This change is for preventing the false-positive alert by CoverityScan.
See CID-1471770 for the detail.

https://github.com/ruby/bigdecimal/commit/4d5b97125b
2021-02-03 18:25:03 +09:00
Nobuyoshi Nakada b4eba8dfee
Prefer block forms to close opened files 2021-02-03 17:34:41 +09:00
Nobuyoshi Nakada d05a268adc
Open gzip file in binary mode 2021-02-03 17:32:41 +09:00
Koichi Sasada 583f364f71 use goto intead of recursion on vm_call0_body()
"alias" type method entries can chain another aliased method
so that machine stack can be overflow on nested alias chain.
http://ci.rvm.jp/results/trunk-repeat20@phosphorus-docker/3344209

This patch fix this issue by use goto instead of recursion if possible.

TODO: Essentially, the alias method should not points another aliased
method entry. Try to fix it later.
2021-02-03 17:28:12 +09:00
Kazuhiro NISHIYAMA f600226fb4
Fix failures with EditLine
On macOS with EditLine:
```
$ ruby -r readline -e 'Readline.readline("> "); p Readline::VERSION' < /dev/null
"EditLine wrapper"
```

On Linux with GNU readline:
```
$ ruby -r readline -e 'Readline.readline("> "); p Readline::VERSION' < /dev/null
> "8.0"
```
2021-02-03 14:38:31 +09:00
Nobuyoshi Nakada ea47a9506a
Adjusted indent [ci skip] 2021-02-03 13:42:03 +09:00
Koichi Sasada 6f727853ce only main thread can modify vm->ubf_async_safe
vm->ubf_async_safe is VM global resource and only main thread
can manipulate it.
[Bug #17482]
2021-02-03 08:53:02 +09:00
git c0fa4c7bbe * 2021-02-03 [ci skip] 2021-02-03 00:09:49 +09:00
Nobuhiro IMAI b0fb208218 [ruby/irb] follow up the actual line number
https://github.com/ruby/irb/commit/7aed8fe3b1
2021-02-03 00:09:32 +09:00
David CARLIER 739f9297c5
NetBSD build update. (#4079) 2021-02-02 22:05:19 +09:00
Koichi Sasada be1486568a add debug code for timer_posix
timer_posix mode is managed by timer_posix.state. This patch
adds some debug code for the transition of the state.
2021-02-02 20:20:39 +09:00
NARUSE, Yui f92b7b7b97 Pass revision by hand if the commit message lacks the ticket number 2021-02-02 19:15:45 +09:00
NARUSE, Yui d29cb56bfa Use local repository instead of remote
to improve performance
2021-02-02 19:14:37 +09:00
NARUSE, Yui ce2062dee6 Drop pushing local repo
I want to push another repo/branch to run CI before pushing it to
official branch.
2021-02-02 19:12:49 +09:00
Nobuyoshi Nakada b03aa7dcd7
Use the lateset winflexbison3
The installation script fault seems fixed at 2.5.23.20200904.
2021-02-02 16:12:16 +09:00