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

59427 Коммитов

Автор SHA1 Сообщение Дата
git 52b1ba0b02 * 2019-12-15 [ci skip] 2019-12-15 00:15:23 +09:00
Nobuyoshi Nakada 5f56a5fc9b
[DOC] Fixed the class name in FrozenError#receiver 2019-12-15 00:14:16 +09:00
Nobuyoshi Nakada 33f0ef44fd
[DOC] Fixed the FrozenError.new result [ci skip] 2019-12-15 00:14:16 +09:00
Benoit Daloze 9e02568363 Improve highlighting in RubyVM::AbstractSyntaxTree docs when using `ri` 2019-12-14 12:26:30 +01:00
Benoit Daloze b4b22b9278 Clarify in the documentation that RubyVM::AbstractSyntaxTree is not stable API
* See [Feature #14844].
2019-12-14 12:21:40 +01:00
Kazuhiro NISHIYAMA 4cc83f9ac6
[Feature #13083] is already reverted 2019-12-14 16:05:49 +09:00
Kazuhiro NISHIYAMA 90cdcefa78
Update warnings in NEWS 2019-12-14 16:05:15 +09:00
Yuki Nishijima e2708068ad Drop delegate dependency
Original comment:
  2f26c9ee77
2019-12-13 21:40:52 -05:00
Marcus Stollsteimer f3240eb67d NEWS: fix pattern matching example 2019-12-13 22:07:59 +01:00
git 835703c69f * 2019-12-14 [ci skip] 2019-12-14 00:40:25 +09:00
Nobuyoshi Nakada 84b873e381 [ruby/irb] Restore environment variables
https://github.com/ruby/irb/commit/236590882c
2019-12-14 00:39:53 +09:00
Hiroshi SHIBATA ab1f3d63b0
Fixed a typo 2019-12-13 22:10:28 +09:00
Hiroshi SHIBATA 2ef5f012c1
Added explicitly loading `Gem::Command` class 2019-12-13 22:00:28 +09:00
Nobuyoshi Nakada eb512c5a95
warn should be a global function 2019-12-13 21:38:50 +09:00
Nobuyoshi Nakada a2e8712349
Fix visibility as module_function 2019-12-13 20:51:58 +09:00
Nobuyoshi Nakada 6183addf6a Add `Warning.[]` and `Warning.[]=` 2019-12-13 20:47:07 +09:00
Nobuyoshi Nakada f3b1b645ed Create backtrace location array directly 2019-12-13 20:47:07 +09:00
Nobuyoshi Nakada 0b5268afbc Moved Kernel#warn to warning.rb 2019-12-13 20:47:07 +09:00
Hiroshi SHIBATA 82cc2843a9
Prepare to release RubyGems 3.1.0 final version. 2019-12-13 20:19:33 +09:00
Kazuhiro NISHIYAMA 26774351dc
Ignore error of `apt-get update` in MJIT workflow too 2019-12-13 18:06:36 +09:00
Kazuhiro NISHIYAMA d5c73681f8
Ignore error of `apt-get update` on GitHub Actions 2019-12-13 18:04:21 +09:00
Koichi Sasada 97a17a51b8 readable function names for inline functions.
Now, C functions written by __builtin_cexpr!(code) and others are
named as "__builtin_inline#{n}". However, it is difficult to know
what the function is. This patch rename them into
"__builtin_foo_#{lineno}" when cexpr! is in 'foo' method.
2019-12-13 17:55:45 +09:00
Matt Valentine-House 1140625cd3
Allow more than one major version number in target_os 2019-12-13 08:58:42 +09:00
aycabta c2dfc6d869 Show a menu before a document
IRB should show a menu first if a completed list has plural items. But just
shows document without menu if a completed list with plural items includes a
perfect matched item. The behavior is a bug. This commit fixes it.
2019-12-13 08:54:22 +09:00
Nobuyoshi Nakada b8d6c883b3
Improved the test for Thread#inspect [Feature #16412] 2019-12-13 08:52:07 +09:00
git fa5f7a8f7e * 2019-12-13 [ci skip] 2019-12-13 00:05:20 +09:00
aycabta 69b6f8fd04 Check wether TestReadline is defined 2019-12-13 00:04:44 +09:00
Nobuyoshi Nakada 93b27c69cc
Show the failed message too 2019-12-12 23:26:35 +09:00
Kazuhiro NISHIYAMA 68321dd1fa
Move `rescue` for debug into block of assert_raise 2019-12-12 22:05:14 +09:00
Nobuyoshi Nakada dd60856f8d
[cygwin] fix File.absolute_path? test
Paths start with the root are absolute on cygwin, regardless the
drive letter.
2019-12-12 20:53:59 +09:00
Nobuyoshi Nakada b6f25318c5
Cygwin path cannot be mapped to a UNC as-is 2019-12-12 20:53:02 +09:00
Kazuhiro NISHIYAMA c20dd2f754
Add more debug info when Errno::EINVAL
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191212T072406Z.fail.html.gz
2019-12-12 17:38:27 +09:00
Koichi Sasada 54e089df9e show self on control frame dump.
control frame detailed info on RUBY_DEBUG=ci should also show
self information.
2019-12-12 17:03:47 +09:00
Jeremy Evans 55b7ba3686 Make super in instance_eval in method in module raise TypeError
This makes behavior the same as super in instance_eval in method
in class.  The reason this wasn't implemented before is that
there is a check to determine if the self in the current context
is of the expected class, and a module itself can be included
in multiple classes, so it doesn't have an expected class.

Implementing this requires giving iclasses knowledge of which
class created them, so that super call in the module method
knows the expected class for super calls.  This reference
is called includer, and should only be set for iclasses.

Note that the approach Ruby uses in this check is not robust. If
you instance_eval another object of the same class and call super,
instead of an TypeError, you get super called with the
instance_eval receiver instead of the method receiver.  Truly
fixing super would require keeping a reference to the super object
(method receiver) in each frame where scope has changed, and using
that instead of current self when calling super.

Fixes [Bug #11636]
2019-12-12 15:50:19 +09:00
卜部昌平 1a4a9bdb5d proper initialization of struct RVALUE
This changeset makes no difference unless GC_DEBUG is on.  When that flag is
set, struct RVALUE is bigger than struct RObject.  We have to take care of the
additional fields.  Otherwise we get a SIGSEGV like shown below.

The way obj is initialized in this patch works for both GC_DEBUG is on and off.
See also ISO/IEC 9899:1999 section 6.7.8 paragraph #21.

```
Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
62      ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x00005555557dd9a7 in BSD_vfprintf (fp=0x7fffffff6be0, fmt0=0x5555558f3059 "@%s:%d", ap=0x7fffffff6dd0) at vsnprintf.c:1027
#2  0x00005555557db6f5 in ruby_do_vsnprintf (str=0x555555bfc58d <obj_info_buffers+1325> "", n=211, fmt=0x5555558f3059 "@%s:%d", ap=0x7fffffff6dd0) at sprintf.c:1022
#3  0x00005555557db909 in ruby_snprintf (str=0x555555bfc58d <obj_info_buffers+1325> "", n=211, fmt=0x5555558f3059 "@%s:%d") at sprintf.c:1040
#4  0x0000555555661ef4 in rb_raw_obj_info (buff=0x555555bfc560 <obj_info_buffers+1280> "0x0000555555d2bfa0 [0     ] T_STRING (String)", buff_size=256, obj=93825000456096) at gc.c:11449
#5  0x000055555565baaf in obj_info (obj=93825000456096) at gc.c:11612
#6  0x000055555565bae1 in rgengc_remembered (objspace=0x555555c0a1c0, obj=93825000456096) at gc.c:6618
#7  0x0000555555666987 in newobj_init (klass=93824999964192, flags=5, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x555555c0a1c0, obj=93825000456096) at gc.c:2134
#8  0x0000555555666e49 in newobj_slowpath (klass=93824999964192, flags=5, v1=0, v2=0, v3=0, objspace=0x555555c0a1c0, wb_protected=1) at gc.c:2209
#9  0x0000555555666b94 in newobj_slowpath_wb_protected (klass=93824999964192, flags=5, v1=0, v2=0, v3=0, objspace=0x555555c0a1c0) at gc.c:2220
#10 0x000055555565751b in newobj_of (klass=93824999964192, flags=5, v1=0, v2=0, v3=0, wb_protected=1) at gc.c:2256
#11 0x00005555556575ca in rb_wb_protected_newobj_of (klass=93824999964192, flags=5) at gc.c:2272
#12 0x00005555557f36ea in str_alloc (klass=93824999964192) at string.c:728
#13 0x00005555557f2128 in rb_str_buf_new (capa=0) at string.c:1317
#14 0x000055555578c66d in rb_reg_preprocess (p=0x555555cc8148 "^-(.)(.+)?", end=0x555555cc8152 "", enc=0x555555cc7c80, fixed_enc=0x7fffffff74e8, err=0x7fffffff75f0 "") at re.c:2682
#15 0x000055555578ea13 in rb_reg_initialize (obj=93825000046736, s=0x555555cc8148 "^-(.)(.+)?", len=10, enc=0x555555cc7c80, options=0, err=0x7fffffff75f0 "", sourcefile=0x555555d1a5c0 "lib/optparse.rb", sourceline=1460) at re.c:2808
#16 0x000055555578e285 in rb_reg_initialize_str (obj=93825000046736, str=93825000046904, options=0, err=0x7fffffff75f0 "", sourcefile=0x555555d1a5c0 "lib/optparse.rb", sourceline=1460) at re.c:2869
#17 0x000055555578ee02 in rb_reg_compile (str=93825000046904, options=0, sourcefile=0x555555d1a5c0 "lib/optparse.rb", sourceline=1460) at re.c:2958
#18 0x0000555555748dfb in rb_parser_reg_compile (p=0x555555d1f760, str=93825000046904, options=0) at parse.y:12157
#19 0x00005555557581c3 in parser_reg_compile (p=0x555555d1f760, str=93825000046904, options=0) at parse.y:12151
#20 0x00005555557580ac in reg_compile (p=0x555555d1f760, str=93825000046904, options=0) at parse.y:12167
#21 0x0000555555746ebb in new_regexp (p=0x555555d1f760, node=0x555555dece68, options=0, loc=0x7fffffff89e8) at parse.y:10072
#22 0x000055555573d1f5 in ruby_yyparse (p=0x555555d1f760) at parse.y:4395
#23 0x000055555574a582 in yycompile0 (arg=93825000404832) at parse.y:5945
#24 0x00005555558c6898 in rb_suppress_tracing (func=0x55555574a470 <yycompile0>, arg=93825000404832) at vm_trace.c:427
#25 0x0000555555748290 in yycompile (vparser=93824999283456, p=0x555555d1f760, fname=93824999283624, line=1) at parse.y:5994
#26 0x00005555557481ae in rb_parser_compile_file_path (vparser=93824999283456, fname=93824999283624, file=93824999283400, start=1) at parse.y:6098
#27 0x00005555557cdd35 in load_file_internal (argp_v=140737488331760) at ruby.c:2023
#28 0x00005555556438c5 in rb_ensure (b_proc=0x5555557cd610 <load_file_internal>, data1=140737488331760, e_proc=0x5555557cddd0 <restore_load_file>, data2=140737488331760) at eval.c:1128
#29 0x00005555557cb68b in load_file (parser=93824999283456, fname=93824999283624, f=93824999283400, script=0, opt=0x7fffffffa468) at ruby.c:2142
#30 0x00005555557cb339 in rb_parser_load_file (parser=93824999283456, fname_v=93824999283624) at ruby.c:2164
#31 0x00005555556ba3e1 in load_iseq_eval (ec=0x555555c0a650, fname=93824999283624) at load.c:579
#32 0x00005555556b857a in require_internal (ec=0x555555c0a650, fname=93824999284352, exception=1) at load.c:1016
#33 0x00005555556b7967 in rb_require_string (fname=93824999284464) at load.c:1105
#34 0x00005555556b7939 in rb_f_require (obj=93824999994824, fname=93824999284464) at load.c:811
#35 0x00005555558b7ae0 in call_cfunc_1 (recv=93824999994824, argc=1, argv=0x7ffff7ecd0a8, func=0x5555556b7920 <rb_f_require>) at vm_insnhelper.c:2348
#36 0x00005555558a8889 in vm_call_cfunc_with_frame (ec=0x555555c0a650, reg_cfp=0x7ffff7fccfa0, calling=0x7fffffffaab0, cd=0x555555d76a10, empty_kw_splat=0) at vm_insnhelper.c:2513
#37 0x000055555589fb5c in vm_call_cfunc (ec=0x555555c0a650, reg_cfp=0x7ffff7fccfa0, calling=0x7fffffffaab0, cd=0x555555d76a10) at vm_insnhelper.c:2538
#38 0x000055555589f22e in vm_call_method_each_type (ec=0x555555c0a650, cfp=0x7ffff7fccfa0, calling=0x7fffffffaab0, cd=0x555555d76a10) at vm_insnhelper.c:2924
#39 0x000055555589ef47 in vm_call_method (ec=0x555555c0a650, cfp=0x7ffff7fccfa0, calling=0x7fffffffaab0, cd=0x555555d76a10) at vm_insnhelper.c:3038
#40 0x0000555555866dbd in vm_call_general (ec=0x555555c0a650, reg_cfp=0x7ffff7fccfa0, calling=0x7fffffffaab0, cd=0x555555d76a10) at vm_insnhelper.c:3075
#41 0x00005555558ae557 in vm_sendish (ec=0x555555c0a650, reg_cfp=0x7ffff7fccfa0, cd=0x555555d76a10, block_handler=0, method_explorer=0x5555558ae5d0 <vm_search_method_wrap>) at vm_insnhelper.c:4021
#42 0x000055555587745b in vm_exec_core (ec=0x555555c0a650, initial=0) at insns.def:801
#43 0x0000555555899b9c in rb_vm_exec (ec=0x555555c0a650, mjit_enable_p=1) at vm.c:1907
#44 0x000055555589aaf0 in rb_iseq_eval_main (iseq=0x555555c1da80) at vm.c:2166
#45 0x0000555555641f0b in rb_ec_exec_node (ec=0x555555c0a650, n=0x555555c1da80) at eval.c:277
#46 0x0000555555641d62 in ruby_run_node (n=0x555555c1da80) at eval.c:335
#47 0x000055555557a188 in main (argc=11, argv=0x7fffffffc848) at main.c:50
(gdb) fr 7
#7  0x0000555555666987 in newobj_init (klass=93824999964192, flags=5, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x555555c0a1c0, obj=93825000456096) at gc.c:2134
2134        if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %s is remembered.", obj_info(obj));
(gdb) p ((struct RVALUE*)obj)->file
$1 = 0x65a5992b0fb25ce7 <error: Cannot access memory at address 0x65a5992b0fb25ce7>
(gdb)
```
2019-12-12 14:19:36 +09:00
卜部昌平 35eb12c063 add casts
%p is for void *.  Becuase fprintf is a function with variadic arguments
automatic cast from any pointer to void * does not work.  We have to be
explicit.
2019-12-12 14:19:36 +09:00
卜部昌平 f40143fe7c fix arity mismatch
I missed this in bc3e7924bc because the
function is inside of a #ifdef.
2019-12-12 14:19:36 +09:00
卜部昌平 12de92a368 implement make test-all TESTS=--gc-compact
79eb5e1aca implemented
RUBY_TEST_GC_COMPACT=1 so why not make it also possible via the command
line argument.
2019-12-12 11:13:42 +09:00
Hiroshi SHIBATA 53e8589c69
Import json-2.3.0 from flori/json 2019-12-12 09:14:09 +09:00
aycabta 7d991a0571 Suppress to crash IRB if completed list has nil 2019-12-12 08:40:50 +09:00
Rei Odaira 50ae8895f3 debug_counter.c: include ruby/config.h before stdio.h
to define _LARGE_FILES
2019-12-11 13:33:27 -06:00
Koichi Sasada 27ac034f19 support gc_compact_checker on parallel test. 2019-12-12 04:27:06 +09:00
Aaron Patterson 7dbbba38a0
Make sure we don't push MOVED or NONE on the stack 2019-12-11 11:07:15 -08:00
Koichi Sasada 79eb5e1aca call GC.compact after each test.
RUBY_TEST_GC_COMPACT=1 enables GC.compact checker which calls
GC.compact after each test.
2019-12-12 03:32:12 +09:00
aycabta 51cc5a26df Some tests failed with before GNU Readline 6.0 on Windows 2019-12-12 03:19:09 +09:00
git fe45023366 * 2019-12-12 [ci skip] 2019-12-12 03:13:32 +09:00
Aaron Patterson 0f90630983
Update method tables only if there is a class ext pointer
This makes reference updating look similar to marking, and may avoid
dereferencing a wrong pointer.
2019-12-11 10:12:14 -08:00
Yusuke Endoh cae657c324 Fix .travis.yml to keep s390x-linux as allow_features
[Misc #16360]
2019-12-11 21:54:18 +09:00
Yusuke Endoh 47a365dd58 Move s390x-linux to allow_failures matrix
ref [Misc #16360]
2019-12-11 20:45:50 +09:00
Jeremy Evans 49ffae7ca6
[ruby/forwardable] Bump version to 1.3.1
https://github.com/ruby/forwardable/commit/aa07c55f3f
2019-12-11 20:23:53 +09:00