summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2019-01-28Add refinements support to method/instance_method.nobu
[Fix GH-2034] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-26parse.y: trim newline in erred codenobu
* parse.y (parser_yyerror): trim a newline at the end of the erred code which was replaced with an extra space in the succeeding cursor line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-24parse.y: remove an extra error messagenobu
* parse.y (parse_string): bail out when word-list meets end of input not to show an extra "unexpected" error message after the preceding error. $ ruby -e "%w[" -e:1: unterminated string meets end of file -e:1: syntax error, unexpected terminator, expecting ' ' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-24numeric.c: Fix negative step with float componentsmrkn
* numeric.c (ruby_float_step): fix negative step with float components. * test/ruby/test_numeric.c (test_step_bug15537): add tests. * test/ruby/test_range.c (test_step_bug15537): add tests. [Bug #15537] [ruby-core:91101] From: shuujii (Shuji KOBAYASHI) <shuujii@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-22parse.y: enclose keyword token names by quotesnobu
* parse.y (rb_yytnamerr): strip enclosing double-quotes, same as the default yytnamerr except for that single-quotes matching back-quotes do not stop stripping. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21parse.y: more token namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21test_io.rb: skip test on MJIT to prevent random failurek0kubun
like this: http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1636642 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18Prefer block_given? to iterator?nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16dir.c: fix Dir.glob with braces and matching dirshirosaki
* dir.c (join_path_from_pattern): add the last slash for directory matching. * test/ruby/test_dir.rb (test_glob_recursive_directory): add a test for above. [ruby-core:91110] [Bug #15540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15setbyte / ungetbyte allow out-of-range integersshyouhei
* string.c: String#setbyte to accept arbitrary integers [Bug #15460] * io.c: ditto for IO#ungetbyte * ext/strringio/stringio.c: ditto for StringIO#ungetbyte git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15Suppress warning: ambiguous first argument; put parentheses or a space even ↵naruse
after `/' operator git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-14ast.c: fix missing head part in dynamic literalnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-12No FloatDomainError at non-finitive number if exception: falsenobu
[ruby-core:91021] [Bug #15525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-12No TypeError at nil if exception: falsenobu
[ruby-core:91021] [Bug #15525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-11Ensure to terminate the childnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10test_jit.rb: change format of test error outputk0kubun
to avoid breaking redmine quote like https://bugs.ruby-lang.org/issues/15522 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10test/ruby/test_method.rb: Remove unreachable callkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10proc.c: proc without blocknobu
* proc.c (proc_new): promoted lambda/proc/Proc.new with no block in a method called with a block to a warning/error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10proc.c: check if callablenobu
* proc.c: check the argument at composition, expect a Proc, Method, or callable object. [ruby-core:90591] [Bug #15428] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-09class.c: refactor class_instance_method_listnobu
* class.c (class_instance_method_list): gather singleton and extended methods first separately from ancestors. [ruby-core:90872] [Bug #15501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-08Mark array as "going to be modified" in `Array#reject!`tenderlove
Before this patch, if `reject!` is called on a shared array it can mutate the shared array rather than a copy. This patch marks the array as "going to be modified" so that the shared source array isn't mutated. [Bug #15479] [ruby-core:90781] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-08Check by #name [ruby-core:90853] [Bug #15497]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-08Defer escaping control char in error messagesnobu
* eval_error.c (print_errinfo): defer escaping control char in error messages until writing to stderr, instead of quoting at building the message. [ruby-core:90853] [Bug #15497] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-08range.c (range_last): disable optimization when each is redefinedmrkn
Do not use the optimized version of Range#last when Range#each is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07time.c: support military time zone namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07time.c: UTC and Z timezones should be utcnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07complex.c (f_divide): canonicalize a quotientmrkn
Cannonicalize resultant real and imaginary parts when complex number divided by non-complex number. [Fix GH-2065] [Bug #15505] [ruby-core:90891] From: Joe Peric <peric.joe@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-06ast.c: argument must be a stringnobu
[ruby-core:90904] [Bug #15511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-05test/ruby/test_range.rb: add assertionsmrkn
Add assertions of Range#first and Range#last to examine the type conversion of the arguments and the negative value check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-05parse.y: refine error messagesnobu
* parse.y: refine error messages for tSYMBEG and tSTRING_BEG, which can appear at invalid places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-03test_complex.rb: use the same approach to fix failuresk0kubun
as r66682. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-03test_complex.rb: fix tests for RUBYOPT="-w"k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-02complex.c: fix against redefining component methodsmrkn
This fixes the incompatibility (maybe unintentionally) introduced by removal of `#ifndef PRESERVE_SIGNEDZERO` guards in f_add, f_mul, and f_sub functions in r62701. [Bug #15491] [ruby-core:90843] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-01suppress warning: method redefined; discarding old + introduced at r66681naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-01complex.c: Optimize Complex#+ for some conditionsmrkn
Optimize f_add defined in complex.c for some specific conditions. It makes Complex#+ about 1.4x faster than r66678. Compared to r66678: ``` mrkn-mbp15-late2016:complex-optim-o3 mrkn$ make benchmark ITEM=complex_float_ COMPARE_RUBY=/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby /Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged /Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \ --executables="compare-ruby::/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby -I.ext/common --disable-gem" \ --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \ $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*complex_float_*.yml' -o -name '*complex_float_*.rb' | sort) Calculating ------------------------------------- compare-ruby built-ruby complex_float_add 9.132M 12.864M i/s - 1.000M times in 0.109511s 0.077734s complex_float_div 600.723k 627.878k i/s - 1.000M times in 1.664662s 1.592666s complex_float_mul 2.320M 2.347M i/s - 1.000M times in 0.431039s 0.426113s complex_float_new 1.473M 1.489M i/s - 1.000M times in 0.678791s 0.671750s complex_float_power 1.690M 1.722M i/s - 1.000M times in 0.591863s 0.580775s complex_float_sub 8.870M 9.516M i/s - 1.000M times in 0.112740s 0.105091s Comparison: complex_float_add built-ruby: 12864383.7 i/s compare-ruby: 9131502.8 i/s - 1.41x slower complex_float_div built-ruby: 627878.0 i/s compare-ruby: 600722.5 i/s - 1.05x slower complex_float_mul built-ruby: 2346795.3 i/s compare-ruby: 2319975.7 i/s - 1.01x slower complex_float_new built-ruby: 1488649.1 i/s compare-ruby: 1473207.5 i/s - 1.01x slower complex_float_power built-ruby: 1721837.2 i/s compare-ruby: 1689580.2 i/s - 1.02x slower complex_float_sub built-ruby: 9515562.7 i/s compare-ruby: 8869966.3 i/s - 1.07x slower ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-01test_jit.rb: test methodref insnk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31Method reference operatornobu
Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31load.c: resolve_feature_pathnobu
* load.c (rb_resolve_feature_path): search the path for already loaded feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30vm_args.c: search symbol proc in super classesnobu
* vm_args.c (refine_sym_proc_call): traverse ancestors to search inherited methods for symbol proc. [ruby-dev:50741] [Bug #15489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30test_array.rb: increase timeout for RubyCIk0kubun
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181230T041101Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30test_optimization.rb: increase timeout for RubyCIk0kubun
https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20181230T040002Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-30test_refinement.rb: increase timeout for RubyCIk0kubun
https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon/ruby-trunk/log/20181229T153003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29`TracePoint#enable(target_thraed:)` [Feature #15473]ko1
* vm_trace.c (tracepoint_enable_m): `TracePoint#enable` supports `target_thread:` keyword to filter a target thread. [Feature #15473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29test_jit.rb: suppress random test failurek0kubun
on mswin RubyCI by Permission Denied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29test_gc.rb: increase timeout for RubyCIk0kubun
https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon/ruby-trunk/log/20181229T033003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29test_jit.rb: prevent mixing outputs by race conditionk0kubun
to avoid random failures like https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181229T032506Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29test_notimp.rb: loosen timeoutk0kubun
to prevent random failures like https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20181229T033003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28test_io.rb: increase timeout for RubyCIk0kubun
to stabilize AIX powerpc CI https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20181227T113302Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28test_array.rb: increase timeout for RubyCIk0kubun
to prevent random failures. test/ruby/test_autoload.rb: ditto test/ruby/test_optimization.rb: ditto https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20181228T101706Z.fail.html.gz https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181228T114549Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28Don't allow rb_fiber_resume to raise exception on unborn fiber.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e