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

14066 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 590dc06e38 Get rid of defining methods for tests in core classes
Not to interfere in other tests.
2021-01-09 22:38:06 +09:00
Kenta Murata 89f3125207 [ruby/bigdecimal] Add test cases of conversion from Float
https://github.com/ruby/bigdecimal/commit/28d3836366
2021-01-09 20:35:08 +09:00
Nobuhiro IMAI 7ff0e93f96
parse.y: handle "duplicated argument name" appropriately on ripper.y
refs: 733ed1e184
2021-01-09 13:33:33 +09:00
Takashi Kokubun 98bd7e87a0 [ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.pp
The incompatible interface is not helpful, again if you want to use it
as a standalone library, falling it back to PP.

Original PP.pp also ends with `out << "\n"`.

https://github.com/ruby/irb/commit/4c74c7d84c
2021-01-07 22:43:40 -08:00
Koichi Sasada d4b7e967b6 should use `assert_include` here.
Random ordering test can introduce antoher candidate so it should be
`assert_include`.
2021-01-08 14:44:26 +09:00
aycabta 01235f800f [ruby/reline] Suppress auto indent for adding newlines in pasting
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/074bb017a7
2021-01-08 13:25:18 +09:00
aycabta 76c9a3c8c6 [ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken prompt list
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/558f7be168
2021-01-08 13:25:18 +09:00
aycabta 88af5085db [ruby/reline] Suppress crashing when auto_indent_proc returns broken indent info
Co-authored-by: Juanito Fatas <me@juanitofatas.com>

https://github.com/ruby/reline/commit/7c24276275
2021-01-08 13:25:18 +09:00
aycabta e356b71d35 [ruby/reline] Remove debug print
https://github.com/ruby/reline/commit/d7fbaedc6a
2021-01-08 13:25:18 +09:00
aycabta ea75aed98e [ruby/reline] Correct var names in Reline were different from vi-*-mode-string
https://github.com/ruby/reline/commit/8255fc93b9
2021-01-08 13:25:18 +09:00
aycabta 54c1dcba2b [ruby/reline] Update cursor correctly when just cursor moving
This fixes ruby/reline#236 and ruby/reline#239.

https://github.com/ruby/reline/commit/3e3c89d00b
2021-01-08 13:25:18 +09:00
aycabta 111fddd543 [ruby/irb] Fix BACK_TRACE_LIMIT logic
https://github.com/ruby/irb/commit/30dc5d43fe
2021-01-08 13:25:18 +09:00
aycabta 917050220a [ruby/irb] Use Exception#full_message to show backtrace in the correct order
[Bug #17466]

https://github.com/ruby/irb/commit/1c76845cca
2021-01-08 13:25:18 +09:00
Nobuhiro IMAI ed3264d37a [ruby/irb] refactoring an error handling in `IRB::Inspector`
* moved rescue clause to `#inspect_value` to catch all failures in inspectors
* test with all (currently five kind of) inspect modes
  - tweaked the input due to only `Marshal` can inspect(dump) a `BasicObject`

https://github.com/ruby/irb/commit/9d112fab8e
2021-01-08 13:25:18 +09:00
Nobuhiro IMAI f594775230 [ruby/irb] do not escape a predicate method for doc namespace
* Fixes #88

https://github.com/ruby/irb/commit/d431a30af4
2021-01-08 13:25:18 +09:00
Kenta Murata 82f6085b3e [ruby/bigdecimal] Fix trailing zero handling in rb_uint64_convert_to_BigDecimal
https://github.com/ruby/bigdecimal/commit/2056604d56
2021-01-07 10:20:40 +09:00
Kenta Murata 698d7947c3 [ruby/bigdecimal] Include TestBigDecimalBase in TestBigDecimalUtil
https://github.com/ruby/bigdecimal/commit/f732201df1
2021-01-07 10:19:46 +09:00
Nobuyoshi Nakada 069649389c
strip trailing spaces [ci skip] 2021-01-06 17:34:18 +09:00
Takashi Kokubun d9fdca81ac
600x larger timeout for Reline
I didn't notice it's msec. 2.5s is too short.
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3311385
2021-01-05 23:02:32 -08:00
Adam Hess e13f41e02d
[ruby/ostruct] Allow ostruct to return a value on super (#4028)
This fixes cases where you can super in something that inherits from OpenStruct

Co-authored-by: John Hawthorn <john@hawthorn.email>
2021-01-05 18:34:45 -05:00
Nobuyoshi Nakada ead8d89bd7 [ruby/io-console] Ignore chomp! result and return the modified string
https://github.com/ruby/io-console/commit/09e5ccc729
2021-01-05 21:26:11 +09:00
aycabta 0123bc9d38 [ruby/irb] Use error tokens if there are no correct tokens in the same place
For example, the broken code "%www" will result in only one error token.

https://github.com/ruby/irb/commit/9fa39a7cf3
2021-01-05 18:06:43 +09:00
aycabta 5a1866caff [ruby/irb] Use Ripper::Lexer#scan to take broken tokens
ref. https://github.com/ruby/reline/pull/242

https://github.com/ruby/irb/commit/54f90cb6c9
2021-01-05 18:06:34 +09:00
aycabta 505e01fe12 [ruby/irb] Heredoc may contain multiple newlines in a single token
Use the start token as the indentation criteria so that it works properly in
heredoc.

ref. https://github.com/ruby/reline/pull/242

https://github.com/ruby/irb/commit/9704808dfd
2021-01-05 18:06:26 +09:00
aycabta 5012512398 [ruby/irb] Handle indentations related to keyword "do" correctly
This fixes ruby/irb#158.

https://github.com/ruby/irb/commit/964643400b
2021-01-05 18:06:10 +09:00
aycabta e72a6ed45f [ruby/irb] Escape invalid byte sequence in Exception
This fixes ruby/irb#141.

https://github.com/ruby/irb/commit/0815317d42
2021-01-05 18:05:06 +09:00
aycabta cce72a2411 [ruby/irb] Newline in oneliner def doesn't reset indent
This closes ruby/irb#132.

https://github.com/ruby/irb/commit/43456dcf5e
2021-01-05 18:04:45 +09:00
aycabta 515d6b47ad [ruby/irb] Stringify when a non-object is passed to PP#text
If a nested object is passed to #pp, it may be sometimes passed to the #text
method as an object without being stringified.

This is fixed on the Ruby main repository;
433a3be86a
but it was a bug of Ripper so still needs this workaround for using irb
as a gem on Ruby 3.0.0 or earlier.

Co-authored-by: k0kubun <takashikkbn@gmail.com>

https://github.com/ruby/irb/commit/8d13df22ee
2021-01-04 20:14:31 -08:00
Takashi Kokubun 7a3322a0fd
Fix broken JIT of getinlinecache
e7fc353f04 reverted vm_ic_hit_p's signature change made in 53babf35ef,
which broke JIT compilation of getinlinecache.

To make sure it doesn't happen again, I separated vm_inlined_ic_hit_p to
make the intention clear.
2021-01-04 13:09:08 -08:00
Koichi Sasada e7fc353f04 enable constant cache on ractors
constant cache `IC` is accessed by non-atomic manner and there are
thread-safety issues, so Ruby 3.0 disables to use const cache on
non-main ractors.

This patch enables it by introducing `imemo_constcache` and allocates
it by every re-fill of const cache like `imemo_callcache`.
[Bug #17510]

Now `IC` only has one entry `IC::entry` and it points to
`iseq_inline_constant_cache_entry`, managed by T_IMEMO object.

`IC` is atomic data structure so `rb_mjit_before_vm_ic_update()` and
`rb_mjit_after_vm_ic_update()` is not needed.
2021-01-05 02:27:58 +09:00
Hiroshi SHIBATA 5537adf719 Track RubyGems master(3.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00
Nobuyoshi Nakada 35c3a24c8c
Fixed error message when % at EOF 2021-01-04 12:11:37 +09:00
Nobuyoshi Nakada f4be7a510e
Added tests for Time#getlocal with UTC offset 2021-01-03 23:56:04 +09:00
Takashi Kokubun 4724bf856f
Avoid hanging on --jit-wait after MJIT.pause
When a worker is stopped, nobody will JIT a method for you.
2021-01-03 00:05:38 -08:00
zverok b8d33df1d9 Add Enumerable#compact and Enumerator::Lazy#compact 2021-01-02 17:27:24 +09:00
Kenta Murata c2c0147538
[ruby/bigdecimal] Fix test for Ruby 2.4
Ruby 2.4 does not have RbConfig::LIMITS.

https://github.com/ruby/bigdecimal/commit/c8087523b0
2021-01-02 00:54:09 +09:00
Kenta Murata 448a67cd81
[ruby/bigdecimal] Implement special conversions for 64-bit integers
This change improves the conversion speed from small integers.

```
Comparison:
                           big_n9
              master:   4003688.9 i/s
    bigdecimal 3.0.0:   1270551.0 i/s - 3.15x  slower

                          big_n19
              master:   5410096.4 i/s
    bigdecimal 3.0.0:   1000250.3 i/s - 5.41x  slower
```

https://github.com/ruby/bigdecimal/commit/3429bd7e6f
2021-01-02 00:54:09 +09:00
Kenta Murata 5ee6830abe [ruby/bigdecimal] Fix test_limit
Keep the default value of BigDecimal.limit by BigDecimal.save_limit
to avoid failures of the other test methods due to the unexpected limit.

https://github.com/ruby/bigdecimal/commit/bdc1cc6585
2021-01-02 00:30:57 +09:00
Nobuyoshi Nakada ab32e98f98
Added AST assertions for method definition arguments [Bug #17495] 2021-01-01 14:48:46 +09:00
Nobuyoshi Nakada 1e51027763
Added AST tests for endless method definitions 2021-01-01 14:45:00 +09:00
Nobuyoshi Nakada 20a8425aa0
Make any hash values fixable [Bug #17488]
As hnum is an unsigned st_index_t, the result of RSHIFT may not be
in the fixable range.

Co-authored-by: NeoCat <neocat@neocat.jp>
2020-12-31 12:11:45 +09:00
Takashi Kokubun 15c129d087
Try increasing SMTP's read_timeout for --jit-wait
for random hangs like:
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302188
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3301293
2020-12-29 22:02:48 -08:00
Takashi Kokubun 8e231ffa8c
Increase timeout for reline with --jit-wait
for failures like:
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201229-130509
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201229-165132
http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20201228-015519
2020-12-29 20:06:53 -08:00
Nobuhiro IMAI 9b7ceb6765
irb: add more syntax errors colorizing support (#3967) 2020-12-28 23:07:20 -08:00
Takashi Kokubun af9d4ee133 [ruby/irb] Fix failing tests
https://github.com/ruby/irb/commit/7723ade899
2020-12-28 23:01:01 -08:00
Nobuyoshi Nakada c8010fcec0
Dup kwrest hash when merging other keyword arguments [Bug #17481] 2020-12-28 01:52:18 +09:00
Nobuyoshi Nakada 92f9f998fb
test/test_trick.rb: fixed the position to add timeout 2020-12-25 22:23:53 +09:00
Yusuke Endoh a01d28fed7 test/test_trick.rb: increase timeout of some tests
http://rubyci.s3.amazonaws.com/raspbian10-armv7l/ruby-master/log/20201225T071824Z.fail.html.gz
2020-12-25 21:58:50 +09:00
Nobuyoshi Nakada caae14d90b
test_trick.rb: Make the encoding explicit for code written in UTF-8 2020-12-25 15:57:41 +09:00
Yusuke Endoh 09216f63ba
test/test_trick.rb: Add a test file for TRICK entries (#3988)
* test/test_trick.rb: Add a test file for TRICK entries

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2020-12-25 15:22:37 +09:00