55987 Commits

Author SHA1 Message Date
Samuel Williams
6c6bf9ffcb Add ucontext coroutine implementation for generic fallback. 2019-06-26 20:19:53 +12:00
Yusuke Endoh
a84a99ffab test/ruby/test_array.rb (test_sort_with_replace): run in a subprocess
This test invokes GC.start 100 times, which takes approx. six minutes in
Solaris.  This change runs the test in a separated process, which makes
GC.start faster.
2019-06-26 16:04:07 +09:00
John Hawthorn
04bc4c0662 Resize capacity for fstring
When a string is #frozen, it's capacity is resized to fit (if it is much
larger), since we know it will no longer be mutated.

    > puts ObjectSpace.dump(String.new("a"*30, capacity: 1000))
    {"type":"STRING", "class":"0x7feaf00b7bf0", "bytesize":30, "capacity":1000, "value":"...
    > puts ObjectSpace.dump(String.new("a"*30, capacity: 1000).freeze)
    {"type":"STRING", "class":"0x7feaf00b7bf0", "frozen":true, "bytesize":30, "value":"...

(ObjectSpace.dump doesn't show capacity if capacity is equal to bytesize)

Previously, if we dedup into an fstring, using String#-@, capacity would
not be reduced.

    > puts ObjectSpace.dump(-String.new("a"*30, capacity: 1000))
    {"type":"STRING", "class":"0x7feaf00b7bf0", "frozen":true, "fstring":true, "bytesize":30, "capacity":1000, "value":"...

This commit makes rb_fstring call rb_str_resize, the same as
rb_str_freeze does.

Closes: https://github.com/ruby/ruby/pull/2256
2019-06-26 15:01:48 +09:00
Nobuyoshi Nakada
fe0ddf0e58
ensure is not a continuos line 2019-06-26 15:01:01 +09:00
Yusuke Endoh
6df1814c08 coroutine/arm32/Context.S: save/restore the registers via stack
Retry of 518adcca0a and dbe232e24e
2019-06-26 14:08:10 +09:00
Jeremy Evans
51361272f9 Respect --dest-dir when removing old default gems
Before this, tool/rbinstall would try to remove a gem file that
it may not have access too.

Fixes issue introduced in f550da512cefbe0283106ca839c4836a98efaf3a.
2019-06-25 19:02:48 -07:00
Nobuyoshi Nakada
a3d1cacda6
Decrease indent at "elsif" too 2019-06-26 10:49:23 +09:00
Nobuyoshi Nakada
ea8bc6822d
Remove other debug prints 2019-06-26 10:49:23 +09:00
Hiroshi SHIBATA
e478671e19
Added version guard for backtrace printing feature of psych to ruby/spec. 2019-06-26 09:23:02 +09:00
aycabta
cfa1a18431 Remove debug print...sorry 2019-06-26 08:07:58 +09:00
Jeremy Evans
0f28094201 Improve wording of Local Variables and eval section
As pointed out by nobu, "defined" should be used instead of "assigned".
2019-06-25 11:18:08 -07:00
git
0aa8c3d88b * 2019-06-26 2019-06-26 01:53:22 +09:00
git
dd57442f74 * remove trailing spaces. 2019-06-26 01:53:19 +09:00
Jeremy Evans
0bd5f846df Document local variable interactions with eval
Fixes [Bug #13337]
2019-06-25 09:52:34 -07:00
Yusuke Endoh
730aeb2523 Revert 518adcca0a and dbe232e24e
518adcca0a: "Try using arm32 implementation for fibers."
dbe232e24e: "Order of arguments might be incorrect in arm32 coroutine implementation."

It seems to cause SEGV consistently on Ubuntu armv7l eabihf:

https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T081710Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T111708Z.fail.html.gz
2019-06-25 23:32:26 +09:00
aycabta
57e1a69ea3 Treat auto indent with newline correctly 2019-06-25 22:07:32 +09:00
aycabta
0b57f9b25d Decrease indent when "else", "rescue", "ensure", "when", or "in" come 2019-06-25 22:02:31 +09:00
Yusuke Endoh
1cbc4f9876 test/net/imap/test_imap.rb: use Thread#stop? to wait for server thread
Still timeout occurs.  Retry for 5dd8fdd3f328f741fae4abba00c478e8a51d2a7e.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20190625T032405Z.fail.html.gz
2019-06-25 17:22:02 +09:00
Hiroshi SHIBATA
d7887b05d8
Fixed broken ruby/spec related a53ab897c35586a836710a8afeb1e8c1abd9b087 2019-06-25 16:46:53 +09:00
Jean Boussier
746812ee96 Do not allocate a string to check if a scalar is an integer 2019-06-25 15:56:20 +09:00
Jean Boussier
5a4d2b9f2f Remove string_cache in ScalarScanner 2019-06-25 15:56:20 +09:00
Jean Boussier
63f78bbaae Reduce string allocations in scalar_scanner 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
00d0ede845 Removed CHANGELOG from rdoc files. 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
3c4fc830dd Retired to write CHANGELOG.rdoc. Because It has no update from 2015. 2019-06-25 15:56:20 +09:00
Aaron Patterson
03dac55f90 Dump Hash ivars before elements
When the Hash is revived, the ivars will be set before elements.  This
is for the case when the hash setter depends on ivars set on the hash.
2019-06-25 15:56:20 +09:00
Jordan Owens
0016edbead Add test to demonstrate issue deserializing hash with ivar
Currently the elements of a hash are revived before any ivar values.
This causes an issue when the `[]=` method references an instance
variable.
2019-06-25 15:56:20 +09:00
Aaron Patterson
a53ab897c3 Round trip exception backtraces
This commit allows exception backtraces to round trip
2019-06-25 15:56:20 +09:00
Aaron Patterson
f770a5be66 Refactor exception dumping 2019-06-25 15:56:20 +09:00
Aaron Patterson
4bd1909427 Dumping the backtrace never worked, so remove it
Dumping the backtrace for exceptions never worked, so lets remove it.
2019-06-25 15:56:20 +09:00
Jeremy Evans
d118c84b0b Fix IO#scanf on pipes on Windows
IO.seek on a pipe on Windows raises Errno::EINVAL instead of
Errno::ESPIPE.

Fixes Ruby Bug #15199
2019-06-25 15:56:20 +09:00
David Rodríguez
e572ff2f95 Require version file relatively 2019-06-25 15:56:20 +09:00
SHIBATA Hiroshi
083fda8490 Bump version to 1.2.0. 2019-06-25 15:56:20 +09:00
Hiroshi SHIBATA
9b23aab290 Fixed the wrong path for io-console. 2019-06-25 15:56:20 +09:00
Samuel Williams
dbe232e24e Order of arguments might be incorrect in arm32 coroutine implementation. 2019-06-25 17:04:04 +12:00
git
e09afd15b7 * 2019-06-25 2019-06-25 00:19:49 +09:00
aycabta
9c19cd5222 Refactor calculation of corresponding token depth 2019-06-25 00:18:55 +09:00
Samuel Williams
518adcca0a Try using arm32 implementation for fibers. 2019-06-24 19:09:27 +12:00
NARUSE, Yui
4275f09015 remove UNREACHABLE 2019-06-24 16:01:46 +09:00
Luke Gruber
97b4fe2ff6
array.c: Wrong heap size given to ruby_sized_xfree when freeing shared roots
Fixes [Bug #15953]

Closes: https://github.com/ruby/ruby/pull/2253
2019-06-24 13:34:30 +09:00
NARUSE, Yui
7f64a0b4db Add new encoding CESU-8 [Feature #15931] 2019-06-24 12:58:33 +09:00
Samuel Williams
0e6396d2ac Try using arm64 implementation for fibers. 2019-06-24 15:13:17 +12:00
Samuel Williams
abdbfebad1 Use spaces for indentation in configure.ac. 2019-06-24 15:13:17 +12:00
git
5d4dfcd808 * remove trailing spaces. 2019-06-24 11:25:17 +09:00
Samuel Williams
a071bed7a5 Print warning if not using native coroutine. 2019-06-24 14:24:49 +12:00
git
0b36c90e12 * 2019-06-24 2019-06-24 10:24:51 +09:00
masakazutakewaka
edbad4adcc httpstatus.rb 100% coverage 2019-06-24 10:12:07 +09:00
Rob
c6229e7c69 Adds WebAssembly MIME type 2019-06-24 10:11:56 +09:00
Nobuyoshi Nakada
11a60f9bdb Remove extraneous spaces at the end of status line
Remove extraneous spaces after the status code that is
non-compliant with RFC, i.e `HTTP 200 OK `, to unnecessary
confusion for WEBrick users, by a risk that WEBrick instances in
the wild will have server responses flagged as suspicious or
malicious due to a similar bug in [Cobalt Strike
misconfiguration].

Reported by Matt Tennis <mtennis@paloaltonetworks.com>

[Cobalt Strike misconfiguration]: https://blog.fox-it.com/2019/02/26/identifying-cobalt-strike-team-servers-in-the-wild/
2019-06-24 10:11:47 +09:00
Nobuyoshi Nakada
97a7f463f6
Max length of UNIX socket path is 104 bytes on macOS 2019-06-23 23:12:47 +09:00
Nobuyoshi Nakada
50b2807a7c
Do not lengthen UNIX socket path
* spec/ruby/library/socket/unixsocket/recvfrom_spec.rb: do not
  lengthen UNIX socket path, which is very stricted.
2019-06-23 23:10:16 +09:00