Commit graph

64552 commits

Author SHA1 Message Date
Kazuhiro NISHIYAMA
7cc55f4bc4
Thread#backtrace may return nil [ci skip] 2020-05-12 11:46:41 +09:00
Nobuyoshi Nakada
237bee9d40
Removed extra stringization
Argument of RUBY_ASSERT_FAIL is already stringized message, so no
more extra stringization should be applied.
2020-05-12 10:23:33 +09:00
Nobuyoshi Nakada
3fcf7f0271
win32/mkexports.rb: do not export internal symbols
Functions using `rb_thread_t` and `rb_execution_context_t` are
internal use only.
2020-05-12 10:02:39 +09:00
aycabta
7a7854d8c1 Some I/O in test doesn't have "position"
Just returns column 1 for ambiguous width because this I/O is not tty and can't
seek.
2020-05-12 02:53:44 +09:00
aycabta
d39be242ba Also use pipe for input in test 2020-05-12 02:53:44 +09:00
Yusuke Endoh
42abad2464 numeric.c: optimize float ** 2 case by fastpath
It would be a relatively frequent case.  It is still slower than
`float * float` because `*` has a dedicated VM instruction (opt_mult),
though.
2020-05-12 02:14:27 +09:00
git
95ac235537 * 2020-05-12 [ci skip] 2020-05-12 01:15:45 +09:00
Jean Boussier
1258a0fb90 Remove the 65 size limit for name_err_mesg_to_str
This limit was introduced on Nov 20 1996
in 554b989ba1

Apparently to protect from a buffer overflow:

  * eval.c (f_missing): オブジェクトの文字列表現が長すぎる時バッファ
	  を書き潰していた

However I tested that path with very large strings
and it works fine.
2020-05-11 09:15:24 -07:00
卜部昌平
15e977349e more on NULL versus functions
Function pointers are not void*.  See also
115fec062c
ce4ea956d2
8427fca49b
2020-05-11 16:47:25 +09:00
卜部昌平
4fbb344156 fix sunpro pragma
SunPro's #pragma does_not_return(...) needs an argument.  That does not
fit the attribute syntax we employ.
2020-05-11 16:47:25 +09:00
卜部昌平
233c2018f1 drop varargs.h support
This header file is simply out of date (for decades since at least
1989).  It's the 21st century.  Just stop using it.
2020-05-11 14:56:51 +09:00
卜部昌平
534277fa7b rb_str_new: hoist RB_CONSTANT_P out of function
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html says:

> GCC never returns 1 when you call the inline function with a string
> constant or ...

Because rb_str_new and familiy take string constants, it was a bad idea
for them to contain RB_CONSTANT_P.  We should instead do so in
corresponding macros. [ruby-core:98212]
2020-05-11 11:07:37 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
b85fd1d690 mv include/ruby/{impl,internal}
Devs do not love "impl".
2020-05-11 09:24:08 +09:00
卜部昌平
0d88fe3a72 spaces in comments [ci skip] 2020-05-11 09:24:08 +09:00
卜部昌平
122f96c362 sed -i s/ruby3/rbimpl/g 2020-05-11 09:24:08 +09:00
卜部昌平
97672f669a sed -i s/RUBY3/RBIMPL/g
Devs do not love "3".  The only exception is RUBY3_KEYWORDS in parse.y,
which seems unrelated to our interests.
2020-05-11 09:24:08 +09:00
卜部昌平
d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
卜部昌平
dca234a5dc mv include/ruby/{3,impl}
Devs do not love "3".
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada
c89c3801b9
BASERUBY have to be 1.9 or later at least [Bug #16845]
Many tools under tool directory haven't worked with ruby 1.8.
2020-05-11 03:19:36 +09:00
Nobuyoshi Nakada
4a24cd8eb3
Suppress probably impossible maybe-uninitialized warning 2020-05-11 02:41:41 +09:00
Nobuyoshi Nakada
5d430c1b34
Added more NORETURN declarations 2020-05-11 00:40:14 +09:00
Nobuyoshi Nakada
a1e1fdca09
Fallback MAKE to make 2020-05-11 00:40:14 +09:00
git
27efe3f728 * 2020-05-11 [ci skip] 2020-05-11 00:19:47 +09:00
Nobuyoshi Nakada
3fa4fd4780
Pass MAKE value to configure for non-default name case
GNU make does not export it by default.
2020-05-11 00:18:06 +09:00
Nobuyoshi Nakada
f169931414
win32ole: separate global variable declarations and definitions
https://gcc.gnu.org/gcc-10/changes.html#c

> * GCC now defaults to `-fno-common`.  As a result, global
>   variable accesses are more efficient on various targets.  In
>   C, global variables with multiple tentative definitions now
>   result in linker errors.  With `-fcommon` such definitions are
>   silently merged during linking.
2020-05-10 21:37:59 +09:00
Nobuyoshi Nakada
dd830fab69
Fixed a typo 2020-05-10 18:40:47 +09:00
Nobuyoshi Nakada
42e8de8db9
Fix for cross_compiling
`RubyVM.each_builtin` is not defined when cross compiling.
2020-05-10 17:28:03 +09:00
Takashi Kokubun
967ae6278f
Run rb_syswait on exec failure
not only when !w but also when w == WAITPID_LOCK_ONLY.
See also: f7c0cc3692 and a226434206.
We thought this change was an oversight in the latter commit.

Without this change, the test fails like:

$ make test-all TESTS="../test/ruby/test_process.rb -n test_exec_failure_leaves_no_child" RUN_OPTS="--jit"
...
  1) Failure:
TestProcess#test_exec_failure_leaves_no_child [/home/k0kubun/src/github.com/ruby/ruby/test/ruby/test_process.rb:2493]:
Expected [[26799, #<Process::Status: pid 26799 exit 127>]] to be empty.

Co-Authored-By: Yusuke Endoh <mame@ruby-lang.org>
2020-05-10 00:59:55 -07:00
卜部昌平
50a6d292c0 nmake doesn't understand $<
Fix MSVC build error.
2020-05-10 16:51:10 +09:00
卜部昌平
4fca592e8c delete mk_builtin_binary.rb
To generate what is necessary via generic_erb.rb instead.
2020-05-10 16:51:10 +09:00
卜部昌平
191cfcc407 delete mk_call_iseq_optimized.rb
To generate what is necessary via generic_erb.rb instead.
2020-05-10 16:51:10 +09:00
Takashi Kokubun
a6f8589914
Workaround a zombie process created by Open3
with MJIT worker enabled

The problem:

```
$ ruby -ropen3 --jit -e 'Open3.capture2e("cmake") rescue nil;binding.irb'
irb(main)[01:0]> Process.waitall
=> [[10656, #<Process::Status: pid 10656 exit 127>]]

$ ruby -ropen3 -e 'Open3.capture2e("cmake") rescue nil;binding.irb'
irb(main)[01:0]> Process.waitall
=> []
```

Not sure why it's happening yet, but first I'd like to prevent trunk-mjit-wait
from failing like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2929075.
2020-05-09 22:36:34 -07:00
git
18f22490e8 * 2020-05-10 [ci skip] 2020-05-10 14:19:58 +09:00
Yusuke Endoh
3bf0d2bb92 test/rubygems/test_gem_ext_cmake_builder.rb: make sure cmake available
just for a case.  In addition, this change suppresses unused variable
warning.
2020-05-10 14:18:25 +09:00
卜部昌平
889b0fe46f .github/workflows/compilers.yml: GCC 10.1 released 2020-05-09 22:24:57 +09:00
Nobuyoshi Nakada
883214f8e9
Use %w instead of %i not to create unused IDs 2020-05-09 20:13:30 +09:00
Yusuke Endoh
595e74ae4b test/io/console/test_io_console.rb: Rescue Errno::ENXIO for Solaris
20200509T100003Z.fail.html.gz
```
  1) Failure:
TestIO_Console#test_failed_path [/export/home/users/chkbuild/cb-gcc/tmp/build/20200509T100003Z/ruby/test/io/console/test_io_console.rb:40]:
[Errno::ENODEV, Errno::ENOTTY, Errno::EBADF] exception expected, not #<Errno::ENXIO: No such device or address - /dev/null>.
```
2020-05-09 20:07:38 +09:00
Nobuyoshi Nakada
be575a6eef
[ruby/io-console] Use sys_fail_fptr macro
2b8ba023c8
2020-05-09 17:05:14 +09:00
Hiroshi SHIBATA
7df6eaf29e
Addeed missing RSpec namespace 2020-05-09 16:58:21 +09:00
Nobuyoshi Nakada
581763d14c [ruby/io-console] Fails with EBADF on mingw
530cec574c
2020-05-09 14:51:43 +09:00
Nobuyoshi Nakada
d7a59e2ffe
[ruby/io-console] Expanded expected errors
May fail with ENOTTY instead of ENODEV.

fe117b89e0
2020-05-09 14:46:08 +09:00
Kazuhiro NISHIYAMA
0a86679a7b
Fix a typo [ci skip] 2020-05-09 14:22:33 +09:00
Kazuhiro NISHIYAMA
4314c05377
Fix typos 2020-05-09 14:22:04 +09:00
Nobuyoshi Nakada
cc9bc14530 [ruby/io-console] Added test for failed path
06a540f9b4
2020-05-09 13:57:04 +09:00
Nobuyoshi Nakada
0ce45db115 [ruby/io-console] Show path name at error
6a4b1c1a6d
2020-05-09 13:56:55 +09:00
Nobuyoshi Nakada
5eb446d12f
mjit_worker.c: compile_compact_jit_code is not used on mingw 2020-05-09 13:46:47 +09:00
Nobuyoshi Nakada
1181edd54c
rbuninstall.rb: show paths without destdir as well as rbinstall.rb 2020-05-09 13:45:50 +09:00
Nobuyoshi Nakada
e88bb6a2f7
rbuninstall.rb: get rid of errors when prefix ends with "/." 2020-05-09 01:43:53 +09:00
Nobuyoshi Nakada
8830d60dae
rbuninstall.rb: print output record separator instead of $\ 2020-05-09 01:40:40 +09:00