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

57916 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 3bb1162cac
Folded files in gemspec 2019-09-16 21:51:48 +09:00
git 2a39de193c * 2019-09-16 [ci skip] 2019-09-16 21:37:37 +09:00
Kazuhiro NISHIYAMA 70f57287cf
Fix a typo [ci skip] 2019-09-16 21:36:23 +09:00
卜部昌平 4a403e3f98 oops [ci skip]
Fixing typo.  It seems I failed to press the shift key.
2019-09-15 23:22:41 +09:00
Nobuyoshi Nakada 3a3f48fb8f
Comment lines can be placed between fluent dot now 2019-09-15 23:12:24 +09:00
Nobuyoshi Nakada 751d4ab9c2
Refine Timezone fixture 2019-09-15 21:55:34 +09:00
Nobuyoshi Nakada 6cad064424
Try to fetch commits notes to the source tree automatically
[Bug #16167]
2019-09-15 16:23:33 +09:00
Nobuyoshi Nakada 44d594189a
rb_scan_args_count_lead: use arguments instead of magic numbers 2019-09-15 13:29:12 +09:00
Nobuyoshi Nakada 585b15d75d
make-snapshot: no merge commits in ChangeLog
Parents commit hashs in logs of merge commits are abbreviated to
necessary length depending on the repositories.  Exclude merge
commits from ChangeLog to make it stable.
2019-09-15 11:22:32 +09:00
Nobuyoshi Nakada df4a4bd88c
make-snapshot: export ChangeLog from srcdir 2019-09-15 11:22:32 +09:00
Jeremy Evans 1edcfd6107 Issue a warning if invalid kw_splat is passed to *_kw function
This should only happen if the API is misused.  It's much better
to warn here and fix the problem, versus to try to debug TypeErrors
or segfaults later.
2019-09-14 13:57:39 -07:00
git 395e5f510c * 2019-09-15 [ci skip] 2019-09-15 02:15:29 +09:00
Nobuyoshi Nakada 1ad4be13cb
make-snapshot: deprecated -exported option [Bug #16167] 2019-09-15 02:07:00 +09:00
Nobuyoshi Nakada e9c7fc7ca9
Continue to export even if no notes/commits
Just exporting may not imply exporting ChangeLog which needs
notes/commits.  [Bug #16167]
2019-09-14 23:50:45 +09:00
Nobuyoshi Nakada 6d2dcf9632 [ruby/io-console] Added `intr:` option to IO#raw
Enters raw-mode but enable interrupts.

https://github.com/ruby/io-console/commit/7cba76561a
2019-09-14 23:27:53 +09:00
Takashi Kokubun 8263459627
Keep the reference of imemo while argv may be used
To prevent the `v` reference from being eliminated before argv is used,
calling `rb_free_tmp_buffer` against `v` explicitly.
2019-09-14 21:38:41 +09:00
Nobuyoshi Nakada f41cd4ba43
Fixed one-off error
Needs another room to append an empty hash.
2019-09-14 21:09:39 +09:00
Samuel Williams 9699a5c5bc
Update news regarding `Fiber#raise`. 2019-09-14 22:43:51 +12:00
Jeremy Evans 39c37acf86 Fix memory leak when adding empty keyword hashes
nagachika pointed out that ALLOC_N is actually just malloc, so
this memory wasn't being freed.  This shouldn't be a performance
sensitive code path, and will be going away after 2.7, so just
allocate a temp buffer that will be freed later by Ruby GC.
2019-09-14 02:21:37 -07:00
Jeremy Evans b78a345bd6 Only set RB_PASS_CALLED_KEYWORDS in C functions called directly from Ruby
It is not safe to set this in C functions that can be called from
other C functions, as in the non argument-delegation case, you
can end up calling a Ruby method with a flag indicating keywords
are set without passing keywords.

Introduce some new *_kw functions that take a kw_splat flag and
use these functions to set RB_PASS_CALLED_KEYWORDS in places where
we know we are delegating methods (e.g. Class#new, Method#call)
2019-09-14 01:49:33 -07:00
git b2c29bbab6 * remove trailing spaces. [ci skip] 2019-09-14 08:54:08 +09:00
Jeremy Evans 3cfbfa9628 Consolidate empty keyword handling
Remove rb_add_empty_keyword, and instead of calling that every
place you need to add empty keyword hashes, run that code in
a single static function in vm_eval.c.

Add 4 defines to include/ruby/ruby.h, these are to be used as
int kw_splat values when calling the various rb_*_kw functions:

RB_NO_KEYWORDS :: Do not pass keywords
RB_PASS_KEYWORDS :: Pass final argument (which should be hash) as keywords
RB_PASS_EMPTY_KEYWORDS :: Add an empty hash to arguments and pass as keywords
RB_PASS_CALLED_KEYWORDS :: Passes same keyword type as current method was
                           called with (for method delegation)

rb_empty_keyword_given_p needs to stay.  It is required if argument
delegation is done but delayed to a later point, which Enumerator
does.

Use RB_PASS_CALLED_KEYWORDS in rb_call_super to correctly
delegate keyword arguments to super method.
2019-09-13 16:42:27 -07:00
Jeremy Evans 24b1b33975 Correctly handle keywords for Method#call for cfuncs, send, and attr_*
This sets the correct VM frame flags when using Method#call to
call funcs, and handles empty keyword hashes for cfuncs,
attr_reader, and attr_writer. It also fixes calls to send through
Method#call.  It adds tests for all of those, as well as tests for
using Method#call to call define_method, lambda, and sym_procs
(which didn't require code changes).
2019-09-13 09:53:54 -07:00
aycabta 98f919ed47 The stdlib readline should raise Interrupt when pressing C-c 2019-09-14 00:16:31 +09:00
git 70fe473c7d * 2019-09-14 [ci skip] 2019-09-14 00:12:12 +09:00
aycabta 83ef23bd75 Revert "Use IO#getch to read one char in raw mode"
This reverts commit 805b0a4811.
2019-09-14 00:11:01 +09:00
aycabta e8fff0ec9c Revert "Use IO#getbyte"
This reverts commit 685f12bbca.
2019-09-14 00:10:45 +09:00
aycabta 06bbacc086 Revert "Support multibyte input"
This reverts commit 6d9e54816f.
2019-09-14 00:10:34 +09:00
Nobuyoshi Nakada 7e0f56fb3d
Name dynamically defined methods with line numbers 2019-09-13 19:48:44 +09:00
Nobuyoshi Nakada 5f5aca1b5f
Moved ruby_node_name declaration to node.h 2019-09-13 17:20:11 +09:00
Koichi Sasada 2da6b328bb introduce IBF_(MAJOR|MINOR)_VERSION.
RubyVM::InstructionSequence.to_binary generates a bytecode binary
representation. To check compatibility with binary and loading
MRI we prepared major/minor version and compare them at loading
time. However, development version of MRI can change this format
but we can not increment minor version to make them consistent
with Ruby's major/minor versions.

To solve this issue, we introduce new minor version scheme
(binary's minor_version = ruby's minor * 10000 + dev ver)
and we can check incompatibility with older dev version.
2019-09-13 16:24:28 +09:00
Kazuhiro NISHIYAMA 3c162df9d4 Dump some information 2019-09-13 13:44:03 +09:00
git 69acf40b45 * 2019-09-13 [ci skip] 2019-09-13 00:35:29 +09:00
Takashi Kokubun bcd49a4669
Upgrade benchmark_driver to v0.15.5
Fixed new Struct-related keyword argument warnings
2019-09-13 00:34:54 +09:00
Akinori MUSHA ac3e8834e0
Document and test Enumerator.produce
Co-authored-by: Victor Shepelev <zverok.offline@gmail.com>
2019-09-12 20:18:53 +09:00
Akinori MUSHA 775037613b
Implement Enumerator.produce [Feature #14781] 2019-09-12 20:18:53 +09:00
Kazuhiro NISHIYAMA 9f86e5ecb6
Moved coverage.yml to https://github.com/ruby/actions [ci skip] 2019-09-12 18:28:46 +09:00
Aaron Patterson 515b1989b1
Make NODE_ARYPTN layout consistent between Ripper and AST
We are seeing SEGVs in CI:

  http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2253563

This is happening because Ripper constructs AST nodes differently than
parse.y normally does.  Specifically in this case Ripper is assigning 3
`VALUE` objects:

  1febb6f4a1/parse.y (L757-L761)

Where parse.y will normally assign other things:

  1febb6f4a1/parse.y (L11258-L11260)

The important one is the last one, the `struct rb_ary_pattern_info`. The
mark function assumed that `NODE_ARYPTN` have a pointer to `struct
rb_ary_pattern_info`, and used it:

  1febb6f4a1/node.c (L1269-L1274)

In the case of Ripper, `NODE_ARYPTN` doesn't point to an
`rb_ary_pattern_info`, so the mark function would SEGV.  This commit
changes Ripper so that its `NODE_ARYPTN` nodes also point at an
`rb_ary_pattern_info`, and the mark function can continue with the same
assumption.
2019-09-11 14:58:51 -07:00
John Hawthorn 21994b7fd6 Avoid rehashing keys in transform_values
Previously, calling transform_values would call rb_hash_aset for each
key, needing to rehash it and look up its location.

Instead, we can use rb_hash_stlike_foreach_with_replace to replace the
values as we iterate without rehashing the keys.
2019-09-11 14:23:11 -07:00
Aaron Patterson 14e3731059
Make sure WB executes after object is reachable 2019-09-11 11:57:57 -07:00
git 1febb6f4a1 * 2019-09-12 [ci skip] 2019-09-12 03:21:40 +09:00
Jeremy Evans ed96c9f270 Emit missing keyword argument separation warnings for define_method
Previously, the warning functions skipped warning in these cases.
This removes the skipping, and uses a less descriptive warning
instead.

This affected both last argument to keyword warnings and keyword
split warnings.
2019-09-11 11:20:16 -07:00
Kazuhiro NISHIYAMA fba5bbc695
Moved doxygen.yml to https://github.com/ruby/actions [ci skip] 2019-09-11 23:39:36 +09:00
Nobuyoshi Nakada fc3bfd521d
Fixed the function signature to rb_rescue2 2019-09-11 21:36:00 +09:00
Nobuyoshi Nakada 343b0a281d
Made a short-circuit expression w/o result into an `if`-statement 2019-09-11 16:27:30 +09:00
卜部昌平 655c65d65b &$$->nd_lit is uninitialized at this point
See also https://travis-ci.org/ruby/ruby/jobs/583031687#L1874
2019-09-11 16:01:18 +09:00
Kazuhiro NISHIYAMA 489676bd20
Add `--no-progress` to `aws s3` [ci skip]
https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
> --no-progress (boolean) File transfer progress is not displayed. This flag is only applied when the quiet and only-show-errors flags are not provided.
2019-09-11 09:35:06 +09:00
Aaron Patterson 91ee9584f9
Macros can't be expressions, so make a function
Macros can't be expressions, that is a GNU extension (I didn't know
that).  This commit converts the macro to a function so that everything
will compile correctly on non-GNU compatible compilers.
2019-09-10 14:00:48 -07:00
Aaron Patterson 139510238b
WB needs to be executed after object is reachable 2019-09-10 12:42:35 -07:00
git 721cab4706 * 2019-09-11 [ci skip] 2019-09-11 02:45:56 +09:00