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

62488 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada f44114b502
Do not assume all compilers accept same flags as gcc 2020-07-28 16:43:38 +09:00
Nobuyoshi Nakada 7fb12be99f [ruby/net-ftp] Moved Net::Ftp::Version to Net::FTP
On case-insensitive filesystem, generated Net/FTP.html is
overwritten by Net/Ftp.html.

https://github.com/ruby/net-ftp/commit/14a6ff5134
2020-07-28 15:14:01 +09:00
Yusuke Endoh da31900d9d vm_backtrace.c: let rb_profile_frames show cfunc frames
... in addition to normal iseq frames.
It is sometimes useful to point the bottleneck more precisely.
2020-07-28 13:18:08 +09:00
Sergio e4b63202eb Remove unnecessary word from comment 2020-07-28 12:14:45 +09:00
Simon Perepelitsa 09e9f7cf7a [DOC] Clarify ObjectSpace return values are in bytes [ci skip] 2020-07-28 12:13:40 +09:00
Vít Ondruch db0eab1c6f Remove `EnvUtil.rubyexec`, because it is not used anywhere. 2020-07-28 12:11:47 +09:00
Benoit Daloze 126fd5f15c Update to ruby/spec@07164da 2020-07-27 21:41:08 +02:00
Benoit Daloze 7429841ab6 Update to ruby/mspec@9cffee9 2020-07-27 21:41:03 +02:00
Aaron Patterson 35ba2783fe Use a linked list to eliminate imemo tmp bufs for managing local tables
This patch changes local table memory to be managed by a linked list
rather than via the garbage collector.  It reduces allocations from the
GC and also fixes a use-after-free bug in the concurrent-with-sweep
compactor I'm working on.
2020-07-27 12:40:01 -07:00
git c5ae79d7e9 * 2020-07-28 [ci skip] 2020-07-28 00:18:40 +09:00
Jeremy Evans eeef16e190 Prevent SystemStackError when calling super in module with activated refinement
Without this, if a refinement defines a method that calls super and
includes a module with a module that calls super and has a activated
refinement at the point super is called, the module method super call
will end up calling back into the refinement method, creating a loop.

Fixes [Bug #17007]
2020-07-27 08:18:11 -07:00
git cb5127927a * 2020-07-27 [ci skip] 2020-07-27 15:25:35 +09:00
aycabta c4f8095e97 Use typewriter notation for var[:sym] correctly 2020-07-27 15:24:03 +09:00
git a8e5f78585 * 2020-07-26 [ci skip] 2020-07-26 21:24:27 +09:00
Nobuyoshi Nakada d210a39774
Fixed a typo 2020-07-26 21:24:07 +09:00
Nobuyoshi Nakada 3ead2770a1
Respect visibility in non-array Enumerable#inject [Bug #13592] 2020-07-24 21:08:50 +09:00
S.H 2735da2039
Fix Time#to_a behavior with timezone [Bug #17046] 2020-07-24 20:17:31 +09:00
git 922fe4da3f * 2020-07-24 [ci skip] 2020-07-24 11:11:15 +09:00
Nobuyoshi Nakada ba99eae2a5
[ruby/optparse] Fix ls-files matching regexp
As splitting by NUL means to allow the file names to contain
newlines, path names should match at beginning-of-string instead
of beginning-of-line.

https://github.com/ruby/optparse/commit/df3933aa2b
2020-07-24 11:00:34 +09:00
Yusuke Endoh 098e8c2873 Suppress "assigned but unused variable" warnings 2020-07-23 23:44:25 +09:00
Tom Rothe e43d629575 [ruby/observer] add symbol usage example to Observer#add_observer [doc]
https://github.com/ruby/observer/commit/62a94e3799
2020-07-23 09:49:03 -04:00
Nobuyoshi Nakada 54acb3dd52
Improved Enumerable::Lazy#zip
|                    |compare-ruby|built-ruby|
|:-------------------|-----------:|---------:|
|first_ary           |    290.514k|  296.331k|
|                    |           -|     1.02x|
|first_nonary        |    166.954k|  169.178k|
|                    |           -|     1.01x|
|first_noarg         |    299.547k|  305.358k|
|                    |           -|     1.02x|
|take3_ary           |    129.388k|  188.360k|
|                    |           -|     1.46x|
|take3_nonary        |     90.684k|  112.688k|
|                    |           -|     1.24x|
|take3_noarg         |    131.940k|  189.471k|
|                    |           -|     1.44x|
|chain-first_ary     |    195.913k|  286.194k|
|                    |           -|     1.46x|
|chain-first_nonary  |    127.483k|  168.716k|
|                    |           -|     1.32x|
|chain-first_noarg   |    201.252k|  298.562k|
|                    |           -|     1.48x|
|chain-take3_ary     |    101.189k|  183.188k|
|                    |           -|     1.81x|
|chain-take3_nonary  |     75.381k|  112.301k|
|                    |           -|     1.49x|
|chain-take3_noarg   |    101.483k|  192.148k|
|                    |           -|     1.89x|
|block               |    296.696k|  292.877k|
|                    |       1.01x|         -|
2020-07-23 16:57:26 +09:00
Nobuyoshi Nakada 6b3cff12f6
Improved Enumerable::Lazy#flat_map
|        |compare-ruby|built-ruby|
|:-------|-----------:|---------:|
|num3    |     96.333k|  160.732k|
|        |           -|     1.67x|
|num10   |     96.615k|  159.150k|
|        |           -|     1.65x|
|ary2    |    103.836k|  172.787k|
|        |           -|     1.66x|
|ary10   |    109.249k|  177.252k|
|        |           -|     1.62x|
|ary20   |    106.628k|  177.371k|
|        |           -|     1.66x|
|ary50   |    107.135k|  162.282k|
|        |           -|     1.51x|
|ary100  |    106.513k|  177.626k|
|        |           -|     1.67x|
2020-07-23 16:57:26 +09:00
Nobuyoshi Nakada 89a86788e6
New functions to pass more elements than passed 2020-07-23 16:57:25 +09:00
Nobuyoshi Nakada 347639ad8a
Removed fragile tests in https://github.com/ruby/ruby/pull/3349 2020-07-23 14:57:05 +09:00
卜部昌平 ff397d0016 dln.h: delete unused codes
defines.h already has them.  Also __cplusplus can never be defined here.
2020-07-23 14:30:12 +09:00
卜部昌平 c4fc737f75 include/ruby/util.h: delete unused codes
- util.h includes defines.h,
- ... which includes ruby/backward/2/stdarg.h,
- ... which always defines _.

This `#ifndef _` must never happen.
2020-07-23 14:30:12 +09:00
Alan Wu 1d8b689b9e Remove unused field in rb_iseq_constant_body
This was introduced in 191ce5344e
and has been unused since beae6cbf0f
2020-07-23 01:17:59 -04:00
Nobuyoshi Nakada caf565f7bf
Ensure time object meets a given condition [Bug #17042] 2020-07-23 11:52:33 +09:00
S.H afacf85e44
Merge pull request #3352 from S-H-GAMELINKS/bug/17042-strftime
Fix Time#strftime with timezone [Bug #17042]
2020-07-23 11:35:20 +09:00
Nobuyoshi Nakada 8ed687a4d7
Test for weeknumber with timezone [Bug #17042] 2020-07-23 11:33:33 +09:00
Nobuyoshi Nakada f120e65200 [ruby/optparse] Define OptionParser::Version
https://github.com/ruby/optparse/commit/4c0021b5b2
2020-07-23 10:57:33 +09:00
Nobuyoshi Nakada cd429e68d2 [ruby/optparse] Update required ruby version
Now needs `DidYouMean#formatter` which is provided since
did_you_mean 1.2, which requires ruby 2.5.

https://github.com/ruby/optparse/commit/d44bb5c715
2020-07-23 10:57:31 +09:00
Jean Boussier 6a0cb1d649 Avoid allocating a string when dumping an anonymous module or class 2020-07-23 10:52:30 +09:00
Burdette Lamar 5d04ac6ea2
Enhanced RDoc for Array (#3350)
* Enhanced RDoc for Array

Methods:

    ==
    eql?
    hash
    include?
    <=>
2020-07-22 19:06:49 -05:00
Alan Wu 37e6c83609 Lazily insert origins on prepend to save memory
98286e9850 made it so that
`Module#include` allocates an origin iclass on each use. Since `include`
is widely used, the extra allocation can contribute significantly to
memory usage.

Instead of always allocating in anticipation of prepend, this change
takes a different approach. The new setup inserts a origin iclass into
the super chains of all the children of the module when prepend happens
for the first time.

rb_ensure_origin is made static again since now that adding an origin
now means walking over all usages, we want to limit the number of places
where we do it.
2020-07-22 19:01:28 -04:00
git fdcbb288ab * 2020-07-23 [ci skip] 2020-07-23 00:35:16 +09:00
Jeremy Evans d47e124857 Switch reserved for numbered parameter warning to SyntaxError 2020-07-22 08:34:51 -07:00
Nobuyoshi Nakada 50aac2ffd5
Share the size for sigaltstack between configure.ac and signal.c 2020-07-22 21:28:23 +09:00
Jake Zimmerman 8b0dc77a62 configure.ac: Bump the size of sigaltstack
The RubyVM uses C macro defines to feature detect whether
`backtrace(2)` support is available, and if so it includes C level backtraces
when the RubyVM itself crashes.

But on my machine, C level backtraces from `vm_dump.c` didn't work when
using a version of Ruby buillt on the machine, but worked fine when using a
version of Ruby built on another machine and copied to my machine.

The default autoconf test for backtraces uses a sigaltstack size that is
too small, so the SIGSEGV signal handler itself causes a SIGSEGV).
I noticed that signal.c uses a larger sigaltstack size:

https://github.com/ruby/ruby/blob/v2_6_5/signal.c#L568

The specific variables it looks at:

- `HAVE_BACKTRACE`

  this is a macro defined by autoconf because there is a line in the
  configure script like `AC_CHECK_FUNCS(backtrace)` (see the autoconf
  docs for more).

- `BROKEN_BACKTRACE`

  this comes from a custom program that Ruby's configure script runs to
  attempt to figure out whether actually using backtrace(2) in a real
  program works. You can see the autoconf program here.

  <https://github.com/ruby/ruby/blob/v2_6_5/configure.ac#L2817-L2863>

It uses sigaltstack and SA_ONSTACK to create a seperate stack for
handling signals.

The problem was: SIGSTKSZ (which comes from a system header!) was not
suggesting a large enough stack size. When checking on an Ubuntu 16.04
box, we found that SIGSTKSZ was 8192 and MINSIGSTKSZ was 2048.
2020-07-22 20:46:36 +09:00
Hiroshi SHIBATA 7befc0cdfc
Promote optparse to default gems 2020-07-22 18:38:51 +09:00
BurdetteLamar a50750c8a9 Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
BurdetteLamar d29de7b31b Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
BurdetteLamar 8a974e0fcb Enhanced RDoc for Array 2020-07-21 17:07:12 -05:00
aycabta 20172672db Add require 'irb/ruby-lex' to use RubyLex 2020-07-22 04:11:38 +09:00
aycabta ee2529dffe Sometimes result indicator (=>) isn't shown 2020-07-22 03:49:17 +09:00
aycabta 0faf02718a Use simple assersion 2020-07-22 03:13:17 +09:00
git 1d0e8fd4bb * 2020-07-22 [ci skip] 2020-07-22 02:42:15 +09:00
hyrious 02951a45f0 [ruby/rdoc] Create link to unary operator methods correctly
https://github.com/ruby/rdoc/commit/54500cf12a
2020-07-22 02:35:12 +09:00
Benoit Tigeot 7693aa7056 [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flag
https://github.com/ruby/rdoc/commit/9e27299a46
2020-07-22 02:34:58 +09:00