path: root/test
AgeCommit message (Collapse)Author
2021-01-13[ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_dKenta Murata
Using dtoa of mode=0, we can determine the number of digits in decimal that is necessary to represent the given Float number without errors. This change permits digits=0 in BigDecimal(flt) and Float#to_d, and these methods use dtoa of mode=0 when the given digits is 0. Internal implicit conversion from Float also uses digits=0. [Fix GH-70]
2021-01-13Skip test when UDP server is no response.Hiroshi SHIBATA
2021-01-13[ruby/bigdecimal] Use pre-allocated objects for special valuesKenta Murata
2021-01-13[ruby/bigdecimal] Fix exception message raised in Kernel.BigDecimalKenta Murata
2021-01-13[ruby/reline] Move the cursor correctly when deleting at eolaycabta
This fixes ruby/reline#246.
2021-01-13[ruby/reline] Handle ed_search_{prev,next}_history in multiline correctlyaycabta
The current line was being handled incorrectly when displaying the hit history, so it has been fixed to be correct.
2021-01-12Fix the failing test with XDG_CONFIG_HOMEHiroshi SHIBATA
2021-01-12Remove "." and ".." from Dir.glob with FNM_DOTMATCH [Bug #17280]Nobuyoshi Nakada
Co-authored-by: Jeremy Evans <> Notes: Merged:
2021-01-12Convert time component strings to integers more strictlyNobuyoshi Nakada
2021-01-12Show seconds of utc_offset if not zeroNobuyoshi Nakada
2021-01-11Suppress constant redefinition warningsNobuyoshi Nakada
2021-01-09Get rid of defining methods for tests in core classesNobuyoshi Nakada
Not to interfere in other tests. Notes: Merged:
2021-01-09[ruby/bigdecimal] Add test cases of conversion from FloatKenta Murata
2021-01-09parse.y: handle "duplicated argument name" appropriately on ripper.yNobuhiro IMAI
refs: 733ed1e184
2021-01-07[ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.ppTakashi Kokubun
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"`.
2021-01-08should use `assert_include` here.Koichi Sasada
Random ordering test can introduce antoher candidate so it should be `assert_include`.
2021-01-08[ruby/reline] Suppress auto indent for adding newlines in pastingaycabta
Co-authored-by: Juanito Fatas <>
2021-01-08[ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken ↵aycabta
prompt list Co-authored-by: Juanito Fatas <>
2021-01-08[ruby/reline] Suppress crashing when auto_indent_proc returns broken indent infoaycabta
Co-authored-by: Juanito Fatas <>
2021-01-08[ruby/reline] Remove debug printaycabta
2021-01-08[ruby/reline] Correct var names in Reline were different from vi-*-mode-stringaycabta
2021-01-08[ruby/reline] Update cursor correctly when just cursor movingaycabta
This fixes ruby/reline#236 and ruby/reline#239.
2021-01-08[ruby/irb] Fix BACK_TRACE_LIMIT logicaycabta
2021-01-08[ruby/irb] Use Exception#full_message to show backtrace in the correct orderaycabta
[Bug #17466]
2021-01-08[ruby/irb] refactoring an error handling in `IRB::Inspector`Nobuhiro IMAI
* 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`
2021-01-08[ruby/irb] do not escape a predicate method for doc namespaceNobuhiro IMAI
* Fixes #88
2021-01-07[ruby/bigdecimal] Fix trailing zero handling in rb_uint64_convert_to_BigDecimalKenta Murata
2021-01-07[ruby/bigdecimal] Include TestBigDecimalBase in TestBigDecimalUtilKenta Murata
2021-01-06strip trailing spaces [ci skip]Nobuyoshi Nakada
2021-01-05600x larger timeout for RelineTakashi Kokubun
I didn't notice it's msec. 2.5s is too short.
2021-01-05[ruby/ostruct] Allow ostruct to return a value on super (#4028)Adam Hess
This fixes cases where you can super in something that inherits from OpenStruct Co-authored-by: John Hawthorn <> Notes: Merged-By: marcandre <>
2021-01-05[ruby/io-console] Ignore chomp! result and return the modified stringNobuyoshi Nakada
2021-01-05[ruby/irb] Use error tokens if there are no correct tokens in the same placeaycabta
For example, the broken code "%www" will result in only one error token.
2021-01-05[ruby/irb] Use Ripper::Lexer#scan to take broken tokensaycabta
2021-01-05[ruby/irb] Heredoc may contain multiple newlines in a single tokenaycabta
Use the start token as the indentation criteria so that it works properly in heredoc. ref.
2021-01-05[ruby/irb] Handle indentations related to keyword "do" correctlyaycabta
This fixes ruby/irb#158.
2021-01-05[ruby/irb] Escape invalid byte sequence in Exceptionaycabta
This fixes ruby/irb#141.
2021-01-05[ruby/irb] Newline in oneliner def doesn't reset indentaycabta
This closes ruby/irb#132.
2021-01-04[ruby/irb] Stringify when a non-object is passed to PP#textaycabta
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; 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 <>
2021-01-04Fix broken JIT of getinlinecacheTakashi Kokubun
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-05enable constant cache on ractorsKoichi Sasada
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. Notes: Merged:
2021-01-04Track RubyGems master( branch at ↵Hiroshi SHIBATA
55634a8af18a52df86c4275d70fa1179118bcc20 Notes: Merged:
2021-01-04Fixed error message when % at EOFNobuyoshi Nakada
2021-01-03Added tests for Time#getlocal with UTC offsetNobuyoshi Nakada
2021-01-03Avoid hanging on --jit-wait after MJIT.pauseTakashi Kokubun
When a worker is stopped, nobody will JIT a method for you.
2021-01-02Add Enumerable#compact and Enumerator::Lazy#compactzverok
Notes: Merged:
2021-01-02[ruby/bigdecimal] Fix test for Ruby 2.4Kenta Murata
Ruby 2.4 does not have RbConfig::LIMITS.
2021-01-02[ruby/bigdecimal] Implement special conversions for 64-bit integersKenta Murata
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 ```
2021-01-02[ruby/bigdecimal] Fix test_limitKenta Murata
Keep the default value of BigDecimal.limit by BigDecimal.save_limit to avoid failures of the other test methods due to the unexpected limit.
2021-01-01Added AST assertions for method definition arguments [Bug #17495]Nobuyoshi Nakada