summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2019-04-06Cover all insns in test_jit againk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06Suppress unnecessary warnings in test_jitk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06Resurrect a test dropped in r67442k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05add definemethod/definesmethod insn.ko1
* insns.def: add definemethod and definesmethod (singleton method) instructions. Old YARV contains these instructions, but it is moved to methods of FrozenCore class because remove number of instructions can improve performance for some techniques (static stack caching and so on). However, we don't employ these technique and it is hard to optimize/analysis definition sequence. So I decide to introduce them (and remove definition methods). `putiseq` insn is also removed. * vm_method.c (rb_scope_visibility_get): renamed to `vm_scope_visibility_get()` and make it accept `ec`. Same for `vm_scope_module_func_check()`. These fixes are result of refactoring `vm_define_method`. * vm_insnhelper.c (rb_vm_get_cref): renamed to `vm_get_cref` because of consistency with other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05update to Unicode Version 12.1.0 (beta)duerst
Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA, for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on May 7th, so we go with the beta version because further changes in the data we need are highly unlikely, and we want to make sure Ruby is ready for the new era. * common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES * enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h: add directory and generated data files for new version * lib/unicode_normalize/tables.rb: update for new character * test/ruby/test_regexp.rb: add test for character property age=12.1 * test/test_unicode_normalize.rb: add test for NFKC decomposition of new character This (mostly) completes issue #15195. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04enumerator.c: make arith_seq_first support nil beginmrkn
* enumerator.c: (arith_seq_first): support nil begin. * test/ruby/test_arithmetic_sequence.rb (test_first): add assertions for beginless and endless arithmetic sequences. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04ruby/test_arithmetic_sequence.rb: add assertions for beginless and endless ↵mrkn
ranges git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-04range.c: support to make beginless arithmetic sequencesmrkn
* range.c (range_step): fix the guard condition so that a beginless range can be turned into a beginless arithmetic sequence. * test/ruby/test_range.rb (test_step): add assertions for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03Revive accidentally removed assertionkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03range.c (r_cover_range_p): support beginless rangemame
`(..2).cover?(..1)` should return true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03Introduce beginless range [Feature#14799]mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-31exp is String, so it's always truthykazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-30ruby.c: respect features by command linenobu
* ruby.c (process_options): feature options in command line arguments take precedence over options in RUBYOPT environment variable. [ruby-core:92052] [Bug #15738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-27Fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21dir.c: fix Dir.glob starts with braceshirosaki
* dir.c (ruby_glob0): expand braces if a glob pattern starts with brace. [ruby-core:91728] [Bug #15649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21Fix a wrong lineno in backtrace for cfuncmame
lineno is an int, and INT2FIX(0) was assigned. [Bug #15719] [ruby-core:91911] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21Show retry's stdout as wellk0kubun
because stderr did not have sufficient information https://ci.appveyor.com/project/ruby/ruby/builds/23242505/job/dirugxujk70nnhp6 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21Explain why cl.exe needs --jit-verbose=2 [ci skip]k0kubun
I forgot to explain it in the previous commit git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21Insert --jit-verbose=2 logs for mswin debuggingk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-18parse.y: numbered parameter in lambdanobu
* parse.y (lambda): support numbered parameters, only when no argument list including empty parentheses, like empty vertical bars. [ruby-core:91859] [Bug #15672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-17Numbered parameters [Feature #4475]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-15Show the source line at an invalid class/instance variablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-14compile.c: fix the corner case of rest and keyword argumentsmame
See https://bugs.ruby-lang.org/issues/10856#note-20 . [Bug #10856] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-14parse.y: no punctuation instance/class variablesnobu
* parse.y (parse_atmark): exclude punctuation follows @ marks, whereas it is inclusive after $ mark as some punctuation global variables exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-14parse.y: show invalid global variable linenobu
* parse.y (parse_gvar): show the source line erred by invalid global variable, and indicate the variable including the wrong punctuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-12Assertion for r67226nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-11Implement Enumerator::Yielder#to_procknu
A Yielder object can now be directly passed to another method as a block argument. ```ruby enum = Enumerator.new { |y| Dir.glob("*.rb") { |file| File.open(file) { |f| f.each_line(&y) } } } ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-10eval.c: clear internal errinfonobu
* eval.c (ruby_cleanup): clear internal error info when invoking end procs. [ruby-core:91731] [Bug #15650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-07io.c: chomp CR at the end of read buffernobu
* io.c (rb_io_getline_fast): chomp CR followed by LF but separated by the read buffer boundary. [ruby-core:91707] [Bug #15642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-06proc.c: call respond_to_missing? with a symbolnobu
[ruby-core:91683] [Bug #15640] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-05string.c: respect the actual encodingnobu
* string.c (rb_enc_str_coderange): respect the actual encoding of if a BOM presents, and scan for the actual code range. [ruby-core:91662] [Bug #15635] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-03do not close FSs explicitly.ko1
* test/ruby/test_dir.rb: r67159 closes all files explicitly but this change breaks attempt of this test introduced at r56467. Try another solution which removes all references from an Array with `#clear`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-03close opened files explicitlyko1
to fix a test failure like http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/1804207 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22Skip EPERM, when statx(2) is wholely blockednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22Skip EPERM, like as r67102nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22STATX_BTIME depends on filesystemsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22Support File#birthtime on Linuxnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Consider END blocknobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Fix rb_bug message pattern listnobu
"Other runtime information" section depends on platforms. Make no expectation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13Fix rb_bug message pattern listnobu
Each setions are separated by an empty line, and C level backtrace information format has been changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13fix test for r67061naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08Use assert_syntax_errornobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08Suppress warning [Feature #15575]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07enum.c: Enumerable#tallynobu
* enum.c (enum_tally): new methods Enumerable#tally, which group and count elements of the collection. [Feature #11076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01Revert r63383, r63248 "compile.c: copy a short insn with leave"nobu
When copying `leave` insn, TRACE also should be copied if it is present, but this optimization is trivial and not worth the complexity. [ruby-core:91366] [Bug #15578] 4cae5353c03009beb1e0a1619422072773580609 5afd479de63b6609ddcd1510da94d2c1ac384f7f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31test_iseq.rb: update expected error messagenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31test_iseq.rb: enablednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-30enumerator.c: fix arith_seq_first for Infinitymrkn
* enumerator.c (arith_seq_first): fix for Float::INFINITY. * test/ruby/test_arithmetic_sequence.rb: add tests. * numeric.c (ruby_float_step_size): export for internal use. * internal.h: add prototype declaration of ruby_float_step_size. [ruby-core:90937][Bug #15518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-28Fix `Module#const_defined?` on inherited constantsnobu
[Fix GH-2061] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-28added assertion with method ref operatornobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e