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

59500 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA efbc0d499c
Merge bundler-2.1.1 from bundler/bundler 2019-12-18 14:53:19 +09:00
卜部昌平 fa7fa5c86b delete rb_vm_call()
Nobody uses it any longer.
2019-12-18 14:14:51 +09:00
卜部昌平 dcb603bbdb describe mc_miss_reuse_call [ci skip] 2019-12-18 14:14:51 +09:00
Nobuyoshi Nakada fcd8bafd08
Use a temporary file for chown test
Errno::EROFS may occur when the source tree is placed in a
read-only filesystem.
2019-12-18 13:35:58 +09:00
Nobuyoshi Nakada c147eeff7c [ruby/io-console] Skip Interrupt test on Linux
Hangs up only in ruby/ruby on Travis-CI.

https://github.com/ruby/io-console/commit/de39aa6dd6
2019-12-18 13:30:52 +09:00
卜部昌平 f054f11a38 per-method serial number
Methods and their definitions can be allocated/deallocated on-the-fly.
One pathological situation is when a method is deallocated then another
one is allocated immediately after that.  Address of those old/new method
entries/definitions can be the same then, depending on underlying
malloc/free implementation.

So pointer comparison is insufficient.  We have to check the contents.
To do so we introduce def->method_serial, which is an integer unique to
that specific method definition.

PS: Note that method_serial being uintptr_t rather than rb_serial_t is
intentional.  This is because rb_serial_t can be bigger than a pointer
on a 32bit system (rb_serial_t is at least 64bit).  In order to preserve
old packing of struct rb_call_cache, rb_serial_t is inappropriate.
2019-12-18 12:52:28 +09:00
Nobuyoshi Nakada 77e3078ede [ruby/io-console] Set raw mode strictly same as cfmakeraw
* Default VMIN and VTIME to minimum input.
* Disable parity check bits explicitly.
* Disable all bits for flow control on input.

Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>

https://github.com/ruby/io-console/commit/5ce201a686
2019-12-18 10:33:05 +09:00
John Hawthorn 254477248c Skip optimized method check for most method IDs
Previously every time a method was defined on a module, we would
recursively walk all subclasses to see if the module was included in a
class which the VM optimizes for (such as Integer#+).

For most method definitions we can tell immediately that this won't be
the case based on the method's name. To do this we just keep a hash with
method IDs of optimized methods and if our new method isn't in that list
we don't need to check subclasses at all.
2019-12-17 09:19:00 -08:00
John Hawthorn 9245462499 Replace debug test with assertion
It's a Ruby bug if this ever happens check it as an assertion instead of
paying the cost of the check every time.
2019-12-17 09:19:00 -08:00
John Hawthorn a01d22b8c1 Check type with BUILTIN_TYPE in method cache clear
We know that this is a heap-allocated object (a CLASS, MODULE, or
ICLASS) so we don't need to check if it is an immediate value. This
should be very slightly faster.
2019-12-17 09:19:00 -08:00
John Hawthorn 8e56d3a6ab Define PREV_CLASS_SERIAL
Avoids genereating a "throwaway" sentinel class serial. There wasn't any
read harm in doing so (we're at no risk of exhaustion and there'd be no
measurable performance impact), but if feels cleaner that all class
serials actually end up assigned and used (especially now that we won't
overwrite them in a single method definition).
2019-12-17 09:19:00 -08:00
John Hawthorn d7a50a5cc6 Avoid revisiting seen nodes clearing method cache
rb_clear_method_cache_by_class calls rb_class_clear_method_cache
recursively on subclasses, where it will bump the class serial and clear
some other data (callable_m_tbl, and some mjit data).

Previously this could end up taking a long time to clear all the classes
if the module was included a few levels deep and especially if there
were multiple paths to it in the dependency tree (ie. a class includes
two modules which both include the same other module) as we end up
revisiting class/iclass/module objects multiple times.

This commit avoids revisiting the same object, by short circuiting when
revisit the same object. We can check this efficiently by comparing the
class serial of each object we visit with the next class serial at the
start. We know that any objects with a higher class serial have already
been visited.
2019-12-17 09:19:00 -08:00
git 8a40dce0ff * 2019-12-18 [ci skip] 2019-12-18 00:08:43 +09:00
Nobuyoshi Nakada bcec03af05
Revert "Skip interruptible raw mode test on Travis-CI"
This reverts commit 65731a1330.
2019-12-18 00:08:21 +09:00
Nobuyoshi Nakada 07ed8f2f91 [ruby/io-console] Skip interrupt
https://github.com/ruby/io-console/commit/8ed5a2bcc3
2019-12-18 00:08:04 +09:00
Nobuyoshi Nakada 905a926ea8 [ruby/io-console] Timeout in the child process
https://github.com/ruby/io-console/commit/b8411689a5
2019-12-17 23:55:24 +09:00
Nobuyoshi Nakada 4b7d27ca0d [ruby/io-console] Use IO.console instead of STDIN
https://github.com/ruby/io-console/commit/9e3ec5b936
2019-12-17 23:55:22 +09:00
Nobuyoshi Nakada 1b86309b04
Squelch filter-branch warning and sleeping 2019-12-17 23:38:18 +09:00
mihaibuzgau ffa7ceceaf [rubygems/rubygems] Move `require uri` to source_list
https://github.com/rubygems/rubygems/commit/c6b4df5bfc
2019-12-17 22:33:44 +09:00
Kazuhiro NISHIYAMA 299db37957 Use while instead of loop 2019-12-17 21:56:09 +09:00
Koichi Sasada 9d3ffcfbfc disable assertion.
This assertion is not needed because we found the bug.
ba11a74745.
2019-12-17 20:23:15 +09:00
Nobuyoshi Nakada 65731a1330
Skip interruptible raw mode test on Travis-CI 2019-12-17 17:18:42 +09:00
mihaibuzgau b226a68141
[rubygems/rubygems] require `uri` in source.rb
https://github.com/rubygems/rubygems/commit/8de4d0272e
2019-12-17 16:56:04 +09:00
卜部昌平 ea717d1ce1 convert macros into inline functions
For better readability.
2019-12-17 16:12:17 +09:00
aycabta d616926af9 Remove an unnecessary variable 2019-12-17 14:21:07 +09:00
Masataka Pocke Kuwabara 8f52604b47 Remove unnecessary double bangs from Pathname#root? 2019-12-17 14:14:54 +09:00
Nobuyoshi Nakada 9421c78041
[ruby/logger] Fixed leaked tempfile
https://github.com/ruby/logger/commit/fb3eff153f
2019-12-17 14:01:40 +09:00
aycabta 4f9a4c1a8f Remove unnecessary branches 2019-12-17 13:59:19 +09:00
Nobuyoshi Nakada e36319249b
[ruby/io-console] bump up to 0.5.2 2019-12-17 13:57:58 +09:00
Yusuke Endoh b39d5da974
[ruby/io-console] Use TCSANOW to prevent from discarding the input buffer
TCSAFLUSH discards the buffer read before the mode change, which makes
IRB ignore the buffer input immediately after invoked.  TCSANOW
preserves the buffer.

https://github.com/ruby/io-console/commit/b362920182
2019-12-17 13:55:05 +09:00
Nobuyoshi Nakada 81eb2d16ef
[ruby/io-console] Disable implementation-defined special control characters
In raw mode with interrupt enabled.

https://github.com/ruby/io-console/commit/e9e8e3ff17
2019-12-17 13:55:04 +09:00
Nobuyoshi Nakada ec89a0f803
[ruby/io-console] Added the test for intr option
https://github.com/ruby/io-console/commit/4f01db102d
2019-12-17 13:55:04 +09:00
Nobuyoshi Nakada a9d17af242
[ruby/io-console] Removed dead code
https://github.com/ruby/io-console/commit/a49462ed97
2019-12-17 13:55:04 +09:00
aycabta 64ce658ec5 Fix return condition according to the condition to skip 2019-12-17 13:30:54 +09:00
Thomas Leitner a1713bedb1 [ruby/reline] Implement completion_append_character
There is already the possibility to set Reline.completion_append_character.
However, it is not used by the line editor.

https://github.com/ruby/reline/commit/ab798931b9
2019-12-17 13:19:37 +09:00
Nobuyoshi Nakada 11db4d3a3b [ruby/reline] Disable any implementation-defined special control characters
Including dsusp, lnext, and so on.

https://github.com/ruby/reline/commit/a44abe586b
2019-12-17 13:19:37 +09:00
Koichi Sasada fbe229906b add debug counter to count `call` reusing cases. 2019-12-17 13:15:38 +09:00
aycabta 618d091151 Support change search direction 2019-12-17 13:10:39 +09:00
aycabta a14a0244b4 Support forward-search-history by C-s 2019-12-17 13:07:19 +09:00
Nobuyoshi Nakada c687be4bc0
Added a test for [Bug #16159] 2019-12-17 11:53:30 +09:00
Nobuyoshi Nakada ebe5b66ca8
Reduce tzset calls
Set up-to-date flag always when calling tzset().
2019-12-17 10:48:17 +09:00
Yusuke Endoh d6a2bce64a time.c (find_time_t): fix round-to-zero bug
`find_time_t` did not work correctly for year older than the Epoch
because it used C's integer division (which rounds negative to zero).

For example, `TIme.new(1933)` returned a wrong time whose year is 1922
in Asia/Kuala_Lumpur because there is no 00:00:00 1st Jan. 1933 in the
time zone.

```
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
1932-12-31 00:00:00 +0700
```

This change fixes the issue by using `DIV` macro instead of `/`.
Now `Time.new(1933)` returns a time in 1933.

```
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
1933-01-01 00:20:00 +0720
```

[Bug #16159]
2019-12-17 10:36:20 +09:00
NARUSE, Yui 5da4a310cc close datasocket on stor of server side 2019-12-17 08:24:47 +09:00
NARUSE, Yui 5be34d6a33 ensure to close the data connection [Bug #16413] 2019-12-17 08:24:47 +09:00
aycabta 95213f6df6 Check wether Readline.completion_append_character= exists 2019-12-17 05:08:09 +09:00
Eric Wong b12bc3b046 thread.c: avoid needless read after select|ppoll
We do not need to issue pipe|eventfd read(2) syscall
unless select, ppoll|poll declares the FD needs reading.
2019-12-16 18:31:08 +00:00
Yusuke Endoh bba6386d95 test/ruby/test_process.rb: suppress "unused variable" warning 2019-12-17 00:44:53 +09:00
git c6b1342d29 * 2019-12-17 [ci skip] 2019-12-17 00:01:56 +09:00
Richard Viney 6a75a46053
Make prettyprint’s cycle detection aware of Delegator instances
Fixes [Bug #13144]

Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2019-12-16 23:43:49 +09:00
Yusuke Endoh 251f5d8226 Revert "lib/net/http/response.rb: support raw deflate correctly"
This reverts commit 5105240b1e.

In RFC 2616:

```
   deflate
        The "zlib" format defined in RFC 1950 [31] in combination with
        the "deflate" compression mechanism described in RFC 1951 [29].
```

So "Content-Encoding: deflate" means zlib format, not raw deflate.

[Bug #11268]
2019-12-16 23:39:10 +09:00