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

57333 Коммитов

Автор SHA1 Сообщение Дата
OKURA Masafumi 74726691ba Add details about parameters to define_method doc (#2165)
When we use `define_method` and `define_singleton_method`,
if we supply block parameters to a block then a generated
method has corresponding parameters.
However, the doc doesn't mention it, so this info has been added.
2019-08-16 02:21:17 +09:00
Takashi Kokubun 409ce8c3da
Also clean up branch for worktree 2019-08-16 01:51:22 +09:00
Takashi Kokubun d21616eeb0
Clean up temporary git resources
after `make update-github`
2019-08-16 01:45:11 +09:00
Espartaco Palma 2665e5858f Adding missing test for Net::HTTPGenericRequest initializer (#1835)
A new exception is raised if an URI::HTTP is received and that object doesn't
have a hostname property.
Complementary to #1278
2019-08-16 01:38:46 +09:00
Takashi Kokubun 2f919a92ba
Improve `make update-github` to avoid configure
after doing it once.
2019-08-16 01:37:22 +09:00
Takashi Kokubun 789f17665e
Make `make update-github` idempotent 2019-08-16 01:18:28 +09:00
Takashi Kokubun d013d8e02e
Fix crash on $(PULL_REQUEST) expansion
by directly passing it to Ruby without passing a shell.
Formerly it was broken when $(PULL_REQUEST) included quotes.
2019-08-16 01:11:19 +09:00
Olivier Lacan 7c46aa6911 Avoid confusion in Array#- and Array#difference docs (#2070)
My previous attempt to correct #2068 apparently failed and the confusing
wording ("instances") was merged into trunk instead.

This should address any potential confusion.
2019-08-16 00:42:17 +09:00
Nobuyoshi Nakada 7704bbd640
Marked up command line options [ci skip] 2019-08-16 00:28:22 +09:00
songhuangcn d2070f2e45 Fix doc in Object#respond_to_missing? (#2239) 2019-08-16 00:20:52 +09:00
git 715218c430 * 2019-08-16 [ci skip] 2019-08-16 00:02:38 +09:00
Nobuyoshi Nakada 40806793a9
Fixed class, module and method references [ci skip] 2019-08-16 00:00:50 +09:00
Nobuyoshi Nakada b1003301af
Fixed a markup in different format [ci skip] 2019-08-15 23:59:28 +09:00
Nobuyoshi Nakada d5c33364e3
Fixed heap-use-after-free
* string.c (rb_str_sub_bang): retrieves a pointer to the
  replacement string buffer just before using it, for the case of
  replacement with the receiver string itself.  [Bug #16105]
2019-08-15 23:39:14 +09:00
Nobuyoshi Nakada c4152b11a7
Prepare to pull commits notes [ci skip] 2019-08-15 21:34:34 +09:00
Nobuyoshi Nakada fff2b231a3
Simplified GITHUB_TOKEN argument [ci skip] 2019-08-15 21:26:51 +09:00
Koichi Sasada 53a55aeff3
introduce RUBY_ON_BUG envval. (#2331)
`rb_bug()` is called at critical bug, MRI can't run anymore.
To make debug easy, this patch introduces RUBY_ON_BUG environment
variable to specify the process which is called with pid.
[Feature #16090] [GH #2331]

  RUBY_ON_BUG='gdb -p' ruby xxx.rb

In this case, if ruby interpreter causes critical bug, and call
rb_bug(), then "gdb -p [PID]' is called by system(3). You can
debug on invoked gdb.

This feature is limited on RUBY_DEVEL build.
2019-08-15 13:48:58 +09:00
git 132b7eb104 * expand tabs. [ci skip] 2019-08-15 08:16:14 +09:00
Jeremy Evans 6954ff1dcb Make Range#=== operate like cover? instead of include? for string ranges
Previously, Range#=== treated string ranges that were not endless or
beginless the same as include?, instead of the same as cover?.
I think this was an oversight in 989e07c0f2,
as the commit message did not indicate this behavior was desired.

This also makes some previously dead code no longer dead. Previously,
the conditionals were doing this:

    if (RB_TYPE_P(beg, T_STRING)
        if (NIL_P(beg)) # can never be true

This restructures it so at the NIL_P(beg) check, beg could possibly
be nil (beginless ranges).

Fixes [Bug #15449]
2019-08-14 14:14:49 -07:00
Jeremy Evans 082424ef58 Fold to lowercase intead of uppercase for String#casecmp
strcasecmp(3) and String#casecmp? both fold to lowercase.
2019-08-14 14:11:39 -07:00
Jeremy Evans d5c60214c4 Implement Range#minmax
Range#minmax was previous not implemented, so calling #minmax on
range was actually calling Enumerable#minmax.  This is a simple
implementation of #minmax by just calling range_min and range_max.

Fixes [Bug #15867]
Fixes [Bug #15807]
2019-08-14 11:22:07 -07:00
Jeremy Evans 661927a4c5 Switch to using a VM stack argument instead of 2nd operand for getconstant
Some tooling depends on the current bytecode, and adding an operand
changes the bytecode.  While tooling can be updated for new bytecode,
this support doesn't warrant such a change.
2019-08-14 11:22:07 -07:00
Jeremy Evans 6ac6de84ac Use Qtrue/Qfalse instead of 1/0 for 2nd operand to getconstant
Fixes error when using -Werror,-Wshorten-64-to-32.
2019-08-14 09:59:27 -07:00
git d053a57014 * expand tabs. [ci skip] 2019-08-15 01:51:19 +09:00
Jeremy Evans fbcd065294 Remove support for nil::Constant
This was an intentional bug added in 1.9.

The approach taken here is to add a second operand to the
getconstant instruction for whether nil should be allowed and
treated as current scope.

Fixes [Bug #11718]
2019-08-14 09:50:14 -07:00
git 7d32cb7631 * 2019-08-15 [ci skip] 2019-08-15 01:00:46 +09:00
Takashi Kokubun 938e075273
Add `make update-github PR=1234` to refresh PR (#2368) 2019-08-15 01:00:26 +09:00
Takashi Kokubun e173012f44
Drop obsoleted `make merge-github` task 2019-08-14 23:41:41 +09:00
Steven Harman 7da40d74e1 backtrace and backtrace_locations can be nil (#2358)
Exception#backtrace and Exception#backtrace_locations can both be nil if
not set. The former can be set via `Exception#set_backtrace`, but the
later is only ever set at runtime via `setup_backtrace`.
2019-08-14 10:35:47 -04:00
Nikolai B 48e9155e65 Remove strange formatting from English [ci skip]
\vref is not valid doc syntax
2019-08-14 23:13:06 +09:00
Takashi Kokubun 9874dca3e7 Mark bundler / bundled-gems as continue-on-failure
because these tests have failed too often and it's false-positive for
checking healthiness of the master branch.
2019-08-14 23:02:09 +09:00
Takashi Kokubun bf77f43b39
Update the description of check_branch 2019-08-14 22:36:49 +09:00
Takashi Kokubun 8be521662d
Rename check_branch.master to pull_request.check_branch
because it's shown as just "master" on a pull request which does not
have the check_branch.master job yet.

"check_branch" would be easier to understand and now we can grep it from
master branch.
2019-08-14 22:22:12 +09:00
Alan Wu c8f97596b7 Don't accidentally name anonymous module/class
b00f280d4b introduced
an accidental behavior change in that defining a module/class under
`m` gives `m` a name when `m` is anonymous.

`ruby -ve 'Module.new { class self::A; end; p name }'` outputs a name
similar to `Module#inspect` when it should output `nil` like in Ruby
2.6.x.

 * variable.c: Use `make_temporary_path` instead of `save_temporary_path`
   when getting the name of the parent module.

 * variable.c (rb_set_class_path): Delegate to `rb_set_class_path_string`
   instead of duplicating the logic.

[Bug #16097]
2019-08-14 17:13:28 +09:00
Koichi Sasada 1cffd5b4f0 fix last commit. 2019-08-14 16:30:30 +09:00
git 0971460e31 * expand tabs. 2019-08-14 16:25:32 +09:00
Koichi Sasada 182a408c2c
change Proc#to_s format ('@...' -> ' ...') (#2362)
Now Proc#to_s returns
"#<Proc:0x00000237a0f5f170@t.rb:1>".
However, it is convenient to select a file name by (double-)clicking
on some terminals by separating ' ' instead of '@' like
"#<Proc:0x00000237a0f5f170 t.rb:1>"
[Feature #16101]
2019-08-14 16:25:15 +09:00
Kazuhiro NISHIYAMA 0623e2b7cc
Suppress Uninitialized variables by Coverity Scan
Coverity Scan says:
```
** CID 1452284: Uninitialized variables (UNINIT)
/eval.c: 223 in rb_ec_cleanup()
```

```
>>> CID 1452284: Uninitialized variables (UNINIT)
>>> Using uninitialized value "errs[1]".
```
2019-08-14 11:47:22 +09:00
Nobuyoshi Nakada c744b62698
io.c: export rb_io_extract_modeenc
* include/ruby/io.h (rb_io_enc_t): add typedef.

* io.c (rb_io_extract_modeenc): export.
2019-08-14 11:20:58 +09:00
Nobuyoshi Nakada cad41bb6d3
[ruby/stringio] Supported BOM
https://github.com/ruby/stringio/commit/b249631c43
2019-08-14 11:20:58 +09:00
Nobuyoshi Nakada 22e942deb2
[ruby/stringio] Supported `mode:` option
https://github.com/ruby/stringio/commit/53def32ba0
2019-08-14 11:20:58 +09:00
Nobuyoshi Nakada 8b44307894
[ruby/stringio] Allow bignum mode
https://github.com/ruby/stringio/commit/d28927b561
2019-08-14 11:20:58 +09:00
Nobuyoshi Nakada e54d349a01
[ruby/stringio] Added support for older versions
https://github.com/ruby/stringio/commit/c4a13d41cd
https://github.com/ruby/stringio/commit/359c9f395c
2019-08-14 11:20:58 +09:00
Nobuyoshi Nakada c8f9e9a2a0
[ruby/stringio] stringio: encoding support
https://github.com/ruby/stringio/commit/7b20075ab0
2019-08-14 11:20:57 +09:00
Takashi Kokubun 765d603153
Try to fix variable reference on Windows (#2361)
https://github.com/ruby/ruby/runs/192869165
2019-08-14 10:52:15 +09:00
Takashi Kokubun 8a687b8a4f Stop using official actions/checkout
because it has been unstable, and also it sometimes does not work for a
pull request like:
https://github.com/ruby/ruby/pull/2358/checks?check_run_id=192685048#step:4:17
2019-08-14 10:22:25 +09:00
SHIBATA Hiroshi 216d230080
Move some assertions to CoreAssertions. (#2354)
They are used by default gems like forwardable.

    * assert_raise_with_message
    * assert_warning
    * assert_warn
2019-08-14 07:44:26 +09:00
git 930e637c0e * 2019-08-14 2019-08-14 00:23:38 +09:00
Nobuyoshi Nakada 8827697ec4
Compare actual result 2019-08-14 00:23:19 +09:00
Nobuyoshi Nakada 5b1bf8dd2d
UTF LE is fixed at least the first 2 bytes
* io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it
should be a little-endian UTF, 16 or 32.  [Bug #16099]
2019-08-13 23:38:05 +09:00