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

59328 Коммитов

Автор SHA1 Сообщение Дата
git dcf89b20d7 * 2019-12-07 [ci skip] 2019-12-07 01:28:20 +09:00
Namrata Bhave 544431e028 Adding s390x support (#2727) 2019-12-07 01:27:58 +09:00
Kazuhiro NISHIYAMA 2f6a8baac6
Test interfaces include localhost
When interfaces do not include localhost,
some other tests may fail.
2019-12-06 16:03:16 +09:00
Aaron Patterson 2c8d186c6e
Introduce an "Inline IVAR cache" struct
This commit introduces an "inline ivar cache" struct.  The reason we
need this is so compaction can differentiate from an ivar cache and a
regular inline cache.  Regular inline caches contain references to
`VALUE` and ivar caches just contain references to the ivar index.  With
this new struct we can easily update references for inline caches (but
not inline var caches as they just contain an int)
2019-12-05 13:37:02 -08:00
git 38b7f947a2 * 2019-12-06 [ci skip] 2019-12-06 00:13:22 +09:00
Kazuhiro NISHIYAMA 693cba1a13
Detect started threads when require only 2019-12-06 00:12:58 +09:00
Kazuhiro NISHIYAMA 173b864668
Do not start thread when `require 'drb/drb'` only 2019-12-06 00:12:58 +09:00
Yusuke Endoh 6477d98e49 test/lib/jit_support.rb: Update the regexp for icc
MJIT_CC is always an absolute path.
2019-12-05 23:46:42 +09:00
Yusuke Endoh d43b9eb22d lib/drb/drb.rb: suppress warning: instance variable @pool_proxy not initialized 2019-12-05 22:37:08 +09:00
Yusuke Endoh f4d9daf2b6 coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitly
instead of ruby/config.h, per samuel's request.

dbfd4b780e (diff-7fd78c3cc8a19b7e0637502983ec26ff)
2019-12-05 22:24:58 +09:00
Nobuyoshi Nakada c3abbc1b2f
ext/openssl/extconf.rb: check with -Werror=deprecated-declarations
This reverts commit 0d7d8b2989,
but restore `$warnflags` without the flag, to get rid of using
deprecated functions.
2019-12-05 18:23:01 +09:00
Kazuhiro NISHIYAMA 4c88107c54
Fix `warning: already initialized constant DidYouMean::VERSION`
```
.../gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION
.../lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here
```
2019-12-05 18:18:55 +09:00
Nobuyoshi Nakada 75b644350a
ext/psych/extconf.rb: braced VPATH is for nmake only 2019-12-05 17:57:56 +09:00
Yusuke Endoh 0bca34ddaa test/io/console/test_io_console.rb: add a memo for the mysterious hack 2019-12-05 16:56:08 +09:00
aycabta 264d5aff5a Change encoding of completion list...for more tests 2019-12-05 16:29:47 +09:00
Koichi Sasada ee57920008 move an interrupt point.
`args_ptr` can be corrupted by interrupt handlers.
Pointed by nagachika <https://ruby-trunk-changes.hatenablog.com/entry/ruby_trunk_changes_20191204>.
2019-12-05 15:57:23 +09:00
Yusuke Endoh b40bb27e35 test/io/console/test_io_console.rb: Try the hack for Solaris
I'm not entirely sure why, but test_set_winsize_console gets stuck on
Solaris (and if I recall, macOS).  I found a hack for FreeBSD, so I want
to give it a try on Solaris too.
2019-12-05 15:53:29 +09:00
Takashi Kokubun fa1db8f938
Add missing dependency
https://travis-ci.org/ruby/ruby/jobs/620972117
2019-12-04 22:25:12 -08:00
Takashi Kokubun 72cff5f3af
MJIT_CC and MJIT_SUPPORT are not a prefix
0b19e15a12 was also for "MJIT_SUPPORT"
too.
2019-12-04 22:18:43 -08:00
Takashi Kokubun 5fbb4555b4
Prefer using MJIT_CC for JIT support check
because Solaris might have CC=cc and we'd like to check full path
MJIT_CC=/opt/developerstudio12.5/bin/cc instead.
2019-12-04 22:16:08 -08:00
Yusuke Endoh 199bd851e4 parse.y: suppress "set but not used" warnings on ripper.y 2019-12-05 14:51:55 +09:00
Koichi Sasada edb80dfe3e add additional CF info for CI env
Introduce new RUBY_DEBUG option 'ci' to inform Ruby interpreter
that an interpreter is running on CI environment.

With this option, `rb_bug()` shows more information includes
method entry information, local variables information for each
control frame.
2019-12-05 14:47:31 +09:00
Koichi Sasada c88afd5328 fix parameter 2019-12-05 14:47:31 +09:00
Yusuke Endoh 0d7d8b2989 ext/openssl/extconf.rb: do not use -Werror=deprecated-declarations
It fails to build on Solaris:

```
ossl_cipher.c: 関数 ‘ossl_cipher_init’ 内:
ossl_cipher.c:228:2: エラー: ‘EVP_md5’ is deprecated [-Werror=deprecated-declarations]
  228 |  EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv,
      |  ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/x509v3.h:63,
                 from ossl.h:23,
                 from ossl_cipher.c:10:
/usr/include/openssl/evp.h:732:26: 備考: ここで宣言されています
  732 | DEPRECATED const EVP_MD *EVP_md5(void);
      |                          ^~~~~~~
```

I agree that `-Werror=` is a good habit, but adding it by default is too
aggressive.
2019-12-05 14:45:45 +09:00
Jun Aruga c0d118f41a Fix "cannot find the function: strcpy()" error on arm32 on Travis CI. (#2686)
This issue happened when `libc.so` and `libm.so` path were not found
and `ldd ruby` command also failed to print the shared dependencies
in `test/fiddle/helper.rb`.

See https://travis-ci.org/ruby/ruby/jobs/611483288#L3018
/home/travis/build/ruby/ruby/build/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError)

* Set libc6:armhf as a installing dependency explicitly.
* Remove arm32 from allow_failures.
2019-12-05 14:17:16 +09:00
Antonio Terceiro ed5d032ea3 debug.rb: expand filenames in breakpoints
When debugging some local code, specifying a breakpoint to a local
filename does not work, i.e.

    break lib/foo.rb:10

Expanding the filename makes it work. FWIW byebug has the same behavior.
2019-12-05 13:28:34 +09:00
aycabta 20031f8b74 Change encoding of completion list 2019-12-05 13:06:18 +09:00
Alan Wu df76f2c577
Make TracePoint.stat a singleton method again (#2726)
[Bug #16399]
2019-12-04 21:02:21 -05:00
Jeremy Evans e4db0443bc Make rb_eval_string_wrap specify a cref so constant setting works correctly
Fixes [Bug #10466]
2019-12-05 03:04:38 +02:00
Yuki Nishijima 18d3b5a93a Do not attempt to call methods on the receiver if it is a basic object 2019-12-04 19:55:01 -05:00
Kazuhiro NISHIYAMA 88ee375dd6
Revert "Add debug option to check ci failures on solaris"
This reverts commit f289e3994b.
2019-12-05 09:44:09 +09:00
git fbf10ed5b3 * 2019-12-05 [ci skip] 2019-12-05 09:03:49 +09:00
aycabta e3587ed849 Support disable-completion 2019-12-05 09:02:23 +09:00
aycabta ad8fbf444a Fix variable catch 2019-12-05 09:02:23 +09:00
Nobuyoshi Nakada fb11e6089d
[DOC] Added File::FNM_SYSCASE example [Bug #16391] [ci skip] 2019-12-04 21:52:29 +09:00
Yusuke Endoh dbfd4b780e coroutine/ucontext/Context.c: Include "ruby/config.h" for Solaris
getcontext, makecontext, and swapcontext seem to be available only when
`__EXTENSION__` is defined on Solaris.
2019-12-04 20:59:39 +09:00
Kazuhiro NISHIYAMA a0bc0e1ba1 Fix thread leak in drb 2019-12-04 20:57:24 +09:00
卜部昌平 00bbdf4451 implement Range#count
As matz requested in [Bug #16366].
2019-12-04 15:32:49 +09:00
Koichi Sasada c6e3db0c66 new_cond before mon_initialize
MonitorMixin#new_cond can be called before mon_initialize, so we
need to initialize `@monitor` before it.

https://bugs.ruby-lang.org/issues/16255#note-4
2019-12-04 13:36:41 +09:00
Yusuke Endoh f9e5c74cd2 compile.c: stop wrong peephole optimization when covearge is enabled
jump-jump optimization ignores the event flags of the jump instruction
being skipped, which leads to overlook of line events.

This changeset stops the wrong optimization when coverage measurement is
neabled and when the jump instruction has any event flag.

Note that this issue is not only for coverage but also for TracePoint,
and this change does not fix TracePoint.
However, fixing it fundamentally is tough (which requires revamp of
the compiler).  This issue is critical in terms of coverage measurement,
but minor for TracePoint (ko1 said), so we here choose a stopgap
measurement.

[Bug #15980] [Bug #16397]

Note for backporters: this changeset can be viewed by `git diff -w`.
2019-12-04 10:40:54 +09:00
Nobuyoshi Nakada 5a404efd29 [ruby/io-console] Fixed `intr: false` mode on Windows
https://github.com/ruby/io-console/commit/4c172c01aa
2019-12-04 10:10:45 +09:00
Jeremy Evans 447d583536 Silence incorrect assigned but unused variable warnings in ripper
To only emit the warnings in correct cases would require tracking
local variable usage in ripper, which ripper currently does not do.

Fixes [Bug #15188]
2019-12-04 03:04:22 +02:00
Jeremy Evans a91637c516 Make {Method,UnboundMethod}#super_method handle clone/bind/unbind
This wasn't working previously because the iclass entry wasn't
being copied, and without an iclass entry, super_method returns
nil.

Fixes [Bug #15629]
2019-12-04 01:35:34 +02:00
Yusuke Endoh f9754f0ea0 compile.c: trivial refactoring
Use `for` instead of `while` to make it explicit that it is a traverse
of bytecode.
2019-12-04 08:22:48 +09:00
NARUSE, Yui 8852fa8760 Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)"
This reverts commit 2a22a6b2d8.
Revert [Feature #13083]
2019-12-04 06:40:54 +09:00
NARUSE, Yui 08074eb712 Revert "Revert nil error and adding deprecation message"
This reverts commit 452bee3ee8.
2019-12-04 06:40:54 +09:00
NARUSE, Yui a705f6472c Revert "Improve warning message"
This reverts commit 31110d820c.
2019-12-04 06:40:54 +09:00
NARUSE, Yui 34a66b1f36 Revert "Fix warnings in Regexp#{match,match?} specs"
This reverts commit 782d1b8fb0.
2019-12-04 06:40:54 +09:00
Jeremy Evans a029b54ec7 Make Enumerator::Chain#each treat lambdas as lambda
Previously, lambdas were converted to procs because of how
rb_block_call works.  Switch to rb_funcall_with_block, which
handles procs as procs and lambdas as lambdas.

Fixes [Bug #15613]
2019-12-03 23:18:28 +02:00
Jeremy Evans 47c97e1e84 Do not lose existing constant visibility when autoloading
This copies the private/deprecate constant visibility across the
autoload.  It still is backwards compatible with setting the
private/deprecate constant visibility in the autoloaded file.
However, if you explicitly set public constant in the autoloaded
file, that will be reset after the autoload.

Fixes [Bug #11055]
2019-12-03 17:31:49 +02:00