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

57124 Коммитов

Автор SHA1 Сообщение Дата
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
Takashi Kokubun 79f9c626b6
Use the official actions/checkout again (#2357)
because clone does not checkout exact commit sha, and also we'd need to handle
pull_request on fork, so I tentatively stopped to do this.
2019-08-13 23:36:31 +09:00
git c393734c95 * expand tabs. 2019-08-13 23:00:56 +09:00
Aaron Patterson dd1344b81e
Add compaction callbacks for Enumerator
This commit gives Enumerator compaction support
2019-08-13 10:00:38 -04:00
Takashi Kokubun 94ca848ca1
Update the comment in check_branch [ci skip] (#2355) 2019-08-13 22:56:44 +09:00
Nobuyoshi Nakada e75e548cf9
spec/bundler needs the specific command [ci skip] 2019-08-13 21:11:58 +09:00
Nobuyoshi Nakada d0b2e6412e
Pass rb_execution_context_t* in ruby_run_node 2019-08-13 15:39:49 +09:00
Kazuhiro NISHIYAMA ffab84fa3e
Fix a typo [ci skip] 2019-08-13 15:27:46 +09:00
Nobuyoshi Nakada 75d9fa8b07
Detect VCS from the current directory by default [ci skip] 2019-08-13 12:24:55 +09:00
Nobuyoshi Nakada 0d1af9f942
Push commits notes too [ci skip] 2019-08-13 12:24:40 +09:00