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

63028 Коммитов

Автор SHA1 Сообщение Дата
git ba73e44751 * 2020-09-14 [ci skip] 2020-09-14 02:20:41 +09:00
aycabta b682e0fc21 [ruby/irb] Version 1.2.6
https://github.com/ruby/irb/commit/5a7dd8c3bf
2020-09-14 02:14:02 +09:00
aycabta 5bb9e12573 [ruby/irb] Need calculate_width and split_by_width of Reline::Unicode of reline 0.1.5 or later
https://github.com/ruby/irb/commit/c05bc9e595
2020-09-14 02:13:32 +09:00
aycabta 8f9b1902f4 [ruby/irb] Omit output if first line of multiline is too long
https://github.com/ruby/irb/commit/0feeae38c5
2020-09-14 02:13:18 +09:00
aycabta e468d9f49c [ruby/irb] Add OMIT_ON_ASSIGNMENT
Omit the results evaluated at assignment if they are too long.

The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand,
so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by
default. The result is displayed on assignment, but it will always be short
and within one line of the screen.

https://github.com/ruby/irb/commit/c5ea79d5ce
2020-09-14 02:13:11 +09:00
aycabta 5d841f5631 [ruby/irb] Version 1.2.5
https://github.com/ruby/irb/commit/07beb3964d
2020-09-14 02:12:58 +09:00
aycabta 3a3e933033 [ruby/reline] Version 0.1.5
https://github.com/ruby/reline/commit/c8a419beb5
2020-09-14 02:12:12 +09:00
git d7b279e79f * 2020-09-13 [ci skip] 2020-09-13 12:35:37 +09:00
Kazuhiro NISHIYAMA 3bdf8efd81
Fix typos [ci skip] 2020-09-13 12:35:06 +09:00
Masaki Matsushita 0ac185be40 Fix compile-time check for copy_file_range(2)
* close fds properly
* define USE_COPY_FILE_RANGE if HAVE_COPY_FILE_RANGE is defined
* avoid errors on cross-compiling environments
2020-09-12 16:27:14 +09:00
Masaki Matsushita 012785ef35 Check copy_file_range(2) is actually supported.
see also: https://gitlab.com/gitlab-org/gitlab/-/issues/218999#note_363225872
2020-09-12 16:07:35 +09:00
aycabta ae508633b7 Suppress "assigned but unused variable" warning 2020-09-12 10:07:18 +09:00
aycabta 777d536749 [ruby/reline] Support for word movement escape sequences in iTerm2
https://github.com/ruby/reline/commit/187235f88c
2020-09-12 08:35:52 +09:00
aycabta f36dc2b6de [ruby/reline] Treat prompt correctly when Reline.prompt_proc isn't set
https://github.com/ruby/reline/commit/9c9ba0eff3
2020-09-12 08:35:52 +09:00
aycabta ce389ade45 [ruby/reline] Move cursor to currect vertical pos after rendering a logical line
https://github.com/ruby/reline/commit/9b932df544
2020-09-12 08:35:52 +09:00
aycabta 9baf1bd0a4 [ruby/reline] Stop using chomp option of lines method
https://github.com/ruby/reline/commit/3e2f55c3e0
2020-09-12 08:35:52 +09:00
aycabta 0ec19cc843 [ruby/reline] Stop erasing chars after the cursor at eol
When the cursor is at the end of the line and erases characters after the
cursor, some terminals delete the character at the cursor position.

https://github.com/ruby/reline/commit/e96ec97b02
2020-09-12 08:35:52 +09:00
aycabta 2e34b35a0f [ruby/reline] Skip the nil obtained from getc
The nil means there is nothing in the buffer in some systems. Incidentally,
Errno::EIO is raised if the I/O is closed.

https://github.com/ruby/reline/commit/c698634e74
2020-09-12 08:35:52 +09:00
Yoshinao Muramatu a840ef8569 [ruby/reline] not clear scrollback buffer
https://github.com/ruby/reline/commit/ba800f1461
2020-09-12 08:35:51 +09:00
Yoshinao Muramatu 0862744010 [ruby/reline] clear_screen use Windows API
https://github.com/ruby/reline/commit/2c5ee54cb3
2020-09-12 08:35:51 +09:00
aycabta 770e66030a [ruby/reline] Use str.encoding by default for split_by_width
https://github.com/ruby/reline/commit/2d32604c9e
2020-09-12 08:35:51 +09:00
git ae5d97ca53 * 2020-09-12 [ci skip] 2020-09-12 08:31:07 +09:00
Hiroshi SHIBATA 6042b7433d
Promote time.rb to default gems 2020-09-12 08:29:06 +09:00
Hiroshi SHIBATA 01e0d74965
Promote resolv-replace to default gems 2020-09-11 22:01:08 +09:00
Hiroshi SHIBATA e0675b1c76
Promote resolv to default gems 2020-09-11 21:50:07 +09:00
Hiroshi SHIBATA d1851ba5b9
Promote securerandom to default gems 2020-09-11 21:15:25 +09:00
Hiroshi SHIBATA 2f24818319
Promote open-uri to default gems 2020-09-11 20:38:18 +09:00
Soutaro Matsumoto f0ddbd502c
Let String#slice! return nil (#3533)
Returns `nil` instead of an empty string when non-integer number is given (to make it 2.7 compatible).
2020-09-11 14:34:10 +09:00
Nobuyoshi Nakada 0d78390bfb
rbinstall.rb: OpenStruct has not been needed for years
Since 6f3e8df133 in 2014.
2020-09-11 13:26:20 +09:00
Kazuhiro NISHIYAMA 406559a268
Add missing break
pointed out by Coverity Scan
2020-09-11 11:02:24 +09:00
Hiroshi SHIBATA d55c914f0f Removed DRb.default_safe_level and DRb#safe_level 2020-09-11 10:52:52 +09:00
Hiroshi SHIBATA e691e671ca Removed Thread#safe_level 2020-09-11 10:52:52 +09:00
git 440ab313d0 * 2020-09-11 [ci skip] 2020-09-11 00:49:18 +09:00
Matt Valentine-House ef22af4db0 If the GC runs before the Mutex's are initialised then we get a crash in pthread_mutex_lock.
It is possible for GC to run during initialisation due to objects being allocated
2020-09-10 08:48:51 -07:00
Hiroshi SHIBATA 867204c4a5
Promote syslog to default gems 2020-09-10 20:42:53 +09:00
Hiroshi SHIBATA cf76a4a5c2
Promote base64 to default gems 2020-09-10 18:56:17 +09:00
Hiroshi SHIBATA cf681038d6
Promote shellwords to default gems 2020-09-10 18:56:17 +09:00
Hiroshi SHIBATA cee8e95761
Promote abbrev to default gems 2020-09-10 18:56:16 +09:00
Koichi Sasada ea78960ee5 sync callable_method_entry()
callable_method_entry() read/write method table structures so that
this function should be synchronized between Ractors.
2020-09-10 18:44:02 +09:00
Aaron Patterson 475c8701d7 Make SecureRandom support Ractor
SecureRandom lazily defines `get_random`.  Accessing the mutex to define
the `get_random` method is not supported inside a Ractor.  This commit
defines `gen_random` when `securerandom` is required and makes it
suppore Ractor (as well as thread safe).

Here is a test program:

```ruby
require "securerandom"

r = Ractor.new do
  loop do
    Ractor.yield SecureRandom.hex
  end
end

p r.take
```

Before this commit:

```
$ make runruby
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems ./test.rb
<internal:ractor>:38: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
/Users/aaron/git/ruby/lib/securerandom.rb:94:in `gen_random': can not access instance variables of classes/modules from non-main Ractors (RuntimeError)
<internal:ractor>:124:in `take': thrown by remote Ractor. (Ractor::RemoteError)
	from ./test.rb:9:in `<main>'
/Users/aaron/git/ruby/lib/securerandom.rb:94:in `gen_random': can not access instance variables of classes/modules from non-main Ractors (RuntimeError)
	from /Users/aaron/git/ruby/lib/securerandom.rb:155:in `random_bytes'
	from /Users/aaron/git/ruby/lib/securerandom.rb:176:in `hex'
	from ./test.rb:5:in `block (2 levels) in <main>'
	from ./test.rb:4:in `loop'
	from ./test.rb:4:in `block in <main>'
make: *** [runruby] Error
```

After this commit:

```
$ make runruby
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems ./test.rb
<internal:ractor>:38: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
"3fc8885157e3911bab4b5d7619bb0308"
```
2020-09-09 12:45:43 -07:00
Jean Boussier 5001cc4716 Optimize ObjectSpace.dump_all
The two main optimization are:
  - buffer writes for improved performance
  - avoid formatting functions when possible

```

|                   |compare-ruby|built-ruby|
|:------------------|-----------:|---------:|
|dump_all_string    |       1.038|   195.925|
|                   |           -|   188.77x|
|dump_all_file      |      33.453|   139.645|
|                   |           -|     4.17x|
|dump_all_dev_null  |      44.030|   278.552|
|                   |           -|     6.33x|
```
2020-09-09 11:11:36 -07:00
git 76c7146ab4 * 2020-09-10 [ci skip] 2020-09-10 00:05:36 +09:00
Jean Boussier b49a870414 Add a :since option to dump_all
This is useful to see what a block of code allocated, e.g.

```
GC.start
GC.disable
ObjectSpace.trace_object_allocations do
  # run some code
end
gc_gen = GC.count
allocations = ObjectSpace.dump_all(output: :file, since: gc_gen)
GC.enable
GC.start
retentions = ObjectSpace.dump_all(output: :file, since: gc_gen)
```
2020-09-09 08:05:14 -07:00
Hiroshi SHIBATA 01828a955a
Promote tsort to default gems 2020-09-09 21:53:09 +09:00
Hiroshi SHIBATA b194973dcd
Revert the related commits about `Tempfile.open` change.
Start with fa21985a7a
  to d7492a0be8
2020-09-09 21:10:48 +09:00
Jeremy Evans 6997109fca [ruby/tempfile] Revert Tempfile.open unlinking the file
Document difference in behavior between Tempfile.open and
Tempfile.create.

https://github.com/ruby/tempfile/commit/426d6f887f
2020-09-09 20:15:41 +09:00
git 96f2b2e086 * 2020-09-09 [ci skip] 2020-09-09 01:23:52 +09:00
Takashi Kokubun 65ab2385e3
Use size_t for MJIT's max_ivar_index
iseq_inline_iv_cache_entry's index is also size_t.
%"PRIuSIZE" seems to print warnings against st_index_t in some environments.
2020-09-08 09:22:34 -07:00
Hiroshi SHIBATA b7d86e330c
Workaroud for macOS Big Sur(11.0) 2020-09-08 20:39:23 +09:00
Hiroshi SHIBATA cdef17096c
libSystem.dylib is also symlink. Use libSystem.B.dylib 2020-09-08 20:38:01 +09:00