Commit graph

63490 commits

Author SHA1 Message Date
aycabta
215fe54777 [ruby/reline] Check Errno::EIO
Catch Errno::EIO what will be occurred if the console terminates I/O before
Reline finishes rendering.

e51eaa6d43
2020-08-18 19:04:31 +09:00
Tomás Pollak
f0d3d4fedb [ruby/reline] Add home/end mapping for urxvt and relatives
c30b293f1c
2020-08-18 19:03:27 +09:00
aycabta
a30dea5852 [ruby/irb] Support shortening lambda notetion for nesting level of prompt
f1a775af47
2020-08-18 14:38:02 +09:00
aycabta
43c648c832 [ruby/irb] Support shortening lambda notation
8e3f81d428
2020-08-18 14:38:02 +09:00
aycabta
b3f84b4a5b [ruby/irb] Expand path to run separated test correctly
be2937abd5
2020-08-18 14:38:01 +09:00
Nobuyoshi Nakada
7fa86de15b [ruby/irb] Workaround a bug of ruby-mode.el
6dfd59400d
2020-08-18 14:38:01 +09:00
Nobuyoshi Nakada
82d4da7816 [ruby/irb] Yet another unnecessary readline
933841af11
2020-08-18 14:38:01 +09:00
Nobuyoshi Nakada
0fcbd07247 [ruby/irb] Directly check if the method is available instead of version
3ea9fd9ed0
2020-08-18 14:38:01 +09:00
Nobuyoshi Nakada
6aa786b8a3 [ruby/irb] Get rid of loading readline unnecessarily
420e7d2270
2020-08-18 14:38:01 +09:00
Nobuyoshi Nakada
d32229e338 [ruby/irb] Prefer require_relative to load the files in this library
0ac3bc7296
2020-08-18 14:38:01 +09:00
aycabta
a388e2554c [ruby/irb] Add require 'irb' to test separately
9e4423b6e1
2020-08-18 14:38:01 +09:00
aycabta
126e1fc296 [ruby/irb] Make history infinite if set SAVE_HISTORY to negative
824473e880
2020-08-18 14:38:01 +09:00
aycabta
ef498a016b [ruby/irb] Suppress crash when bignum is set to SAVE_HISTORY
5044eb2730
2020-08-18 14:38:01 +09:00
aycabta
1359da6ec0 [ruby/irb] Add tests about IRB history
82efd370eb
2020-08-18 14:38:01 +09:00
aycabta
6f0ef83de7 [ruby/irb] Symbol.all_symbols was adopted by Ruby 1.8.0 or later
71ba754e8e
2020-08-18 14:38:01 +09:00
aycabta
5474007d61 [ruby/irb] Support oneline method definition
826ae909c9
2020-08-18 14:38:01 +09:00
Yusuke Endoh
701217572f test/fiber/test_backtrace.rb: prevent a warning
```
/home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:9:
warning: ambiguous first argument; put parentheses or a space even after
`/' operator
/home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:15:
warning: ambiguous first argument; put parentheses or a space even after
`/' operator
```
2020-08-18 14:36:39 +09:00
Koichi Sasada
bc00e6aa90 Disable debugging test.
```
  1) Failure:
TestObjSpace#test_trace_object_allocations [/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb:175]:
<nil> expected but was
<"/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb">.
```

@tenderlove will re-enable it soon.
2020-08-18 02:23:12 +09:00
Alan Wu
264e4cd04f Remove write barrier exemption for T_ICLASS
Before this commit, iclasses were "shady", or not protected by write
barriers. Because of that, the GC needs to spend more time marking these
objects than otherwise.

Applications that make heavy use of modules should see reduction in GC
time as they have a significant number of live iclasses on the heap.

 - Put logic for iclass method table ownership into a function
 - Remove calls to WB_UNPROTECT and insert write barriers for iclasses

This commit relies on the following invariant: for any non oirigin
iclass `I`, `RCLASS_M_TBL(I) == RCLASS_M_TBL(RBasic(I)->klass)`. This
invariant did not hold prior to 98286e9 for classes and modules that
have prepended modules.

[Feature #16984]
2020-08-17 17:17:47 -04:00
git
1b34753490 * 2020-08-18 [ci skip] 2020-08-18 01:48:14 +09:00
John Hawthorn
971857c332 Fix method name escaping in ObjectSpace.dump
It's possible to define methods with any name, even if the parser
doesn't support it and it can only be used with ex. send.

This fixes an issue where invalid JSON was output from ObjectSpace.dump
when a method name needed escaping.
2020-08-17 09:47:53 -07:00
Nobuyoshi Nakada
b52a501ca7
Ensure the shortcut cached in the class
As well as the other places using RCLASS_IV_INDEX_TBL.
`IO#reopen` seems the only case that the class of an object can be
changed.
2020-08-17 22:57:40 +09:00
Nobuyoshi Nakada
27f7b047e0
Also escape DEL code 2020-08-17 22:36:48 +09:00
Nobuyoshi Nakada
7b4b5e0840
Fixed the radix for control chars 2020-08-17 22:30:26 +09:00
Samuel Williams
0a218a97ad Expose ec -> backtrace (internal) and use it to implement fiber backtrace.
See <https://bugs.ruby-lang.org/issues/16815> for more details.
2020-08-18 00:56:35 +12:00
Samuel Williams
c45f5ff2b0 Clarify coroutine implementation license.
<https://bugs.ruby-lang.org/issues/16805>
2020-08-17 20:57:04 +12:00
Nobuyoshi Nakada
a90f29ebb2
procnames-start-lines [ci skip] 2020-08-17 14:27:34 +09:00
Nobuyoshi Nakada
352e923242
Revisit "Refactor to reduce "swap" instruction of pattern matching"
Just moved "case base" after allocating cache space.
2020-08-17 14:25:09 +09:00
git
86260ee986 * 2020-08-17 [ci skip] 2020-08-17 09:29:04 +09:00
Kazuhiro NISHIYAMA
5849309c5a
Revert "Refactor to reduce "swap" instruction of pattern matching"
This reverts commit 3a4be429b5.

To fix following warning:

```
compiling ../compile.c
../compile.c:6336:20: warning: variable 'line' is uninitialized when used here [-Wuninitialized]
    ADD_INSN(head, line, putnil); /* allocate stack for cached #deconstruct value */
                   ^~~~
../compile.c:220:57: note: expanded from macro 'ADD_INSN'
  ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
                                                        ^~~~
../compile.c:6327:13: note: initialize the variable 'line' to silence this warning
    int line;
            ^
             = 0
1 warning generated.
```
2020-08-17 09:28:15 +09:00
Jeremy Evans
a73b5cc556 Remove the deprecated override of Kernel#open in open-uri
This was deprecated in 2.7 to resolve [Misc #15893].
2020-08-16 07:41:40 -07:00
wanabe
3a4be429b5 Refactor to reduce "swap" instruction of pattern matching 2020-08-16 18:53:39 +09:00
wanabe
5c40c88a3e Adjust sp for case ... in a: 0 ... end 2020-08-16 18:39:08 +09:00
wanabe
691f10dd89 Adjust sp for case ... in *, a, * end 2020-08-16 18:39:08 +09:00
wanabe
6c407b3668 Adjust sp for case ... in *v end/case ... in v1, v2 end 2020-08-16 18:39:08 +09:00
wanabe
c866d6563f Adjust sp for case ... in v1 ... in v2 end 2020-08-16 18:39:08 +09:00
wanabe
d594078426 Adjust sp for case ... in v1, v2 ... end 2020-08-16 18:39:08 +09:00
wanabe
2bbb7c3d1f Adjust sp for case ... in pat => var ... end 2020-08-16 18:39:08 +09:00
wanabe
6bc0c6c18b Adjust sp for case ... in pat1 | pat2 ... end 2020-08-16 18:39:08 +09:00
wanabe
0759862458 Adjust sp for pattern matching implicit/explicit "else" 2020-08-16 18:39:08 +09:00
git
c1e7f0c709 * 2020-08-16 [ci skip] 2020-08-16 08:43:57 +09:00
wanabe
a7bd0ec570 Warn sp overwriting on compile time 2020-08-16 08:43:29 +09:00
wanabe
ac399c2c7a Show hidden object and TS_BUILTIN for halfbaked insn data 2020-08-16 08:43:29 +09:00
Nobuyoshi Nakada
d75433ae19
[DOC] fixed a missing markup 2020-08-15 14:17:02 +09:00
卜部昌平
4d7818a299 tool/update-deps --fix 2020-08-15 12:09:26 +09:00
卜部昌平
ff30358d13 RARRAY_AREF: convert into an inline function
RARRAY_AREF has been a macro for reasons.  We might not be able to
change that for public APIs, but why not relax the situation internally
to make it an inline function.
2020-08-15 12:09:26 +09:00
git
72d0f2f0e0 * 2020-08-15 [ci skip] 2020-08-15 08:55:26 +09:00
Burdette Lamar
c84ccf1a07
Fix links to Dig Methods document (#3421)
* Fix links to Dig Methods document

* Fix links to Dig Methods document
2020-08-14 18:55:04 -05:00
Nobuyoshi Nakada
fee1b98fde
[DOC] fixed the method name 2020-08-14 16:33:47 +09:00
Nobuyoshi Nakada
e658040266
RSTRING_LEN was not used 2020-08-14 16:12:58 +09:00