aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* console.c: unpaired sizenobu2017-01-071-0/+1
| | | | | | | * ext/io/console/console.c (console_set_winsize): reject unpaired pixel size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: OOB accessnobu2017-01-071-0/+30
| | | | | | | * ext/io/console/console.c (console_set_winsize): fix out-of-bounds access. [ruby-core:79004] [Bug #13112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix optimization for hash aset/aref with fstringeregon2017-01-071-0/+13
| | | | | | | | | | | Patch by Eric Wong [ruby-core:78797]. I don't like the idea of making insns.def any bigger to support a corner case, and "test_hash_aref_fstring_identity" shows how contrived this is. [ruby-core:78783] [Bug #12855] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb: Specify frozen_string_literal: true.kazu2017-01-077-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io.rb: squiggly heredocnobu2017-01-061-2/+3
| | | | | | | * test/ruby/test_io.rb (test_threaded_flush): use squiggly here document to strip leading spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/delegate.rb: Specify frozen_string_literal: true.kazu2017-01-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/cmath.rb: Specify frozen_string_literal: true.kazu2017-01-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adjust indent [ci skip]nobu2017-01-041-57/+62
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add `full` option to `ObjectSpace.dump_all`tenderlove2017-01-031-0/+13
| | | | | | | | | | | | | | | | | | | The `full` option includes all slots (even `T_NONE`) in the JSON output. This is to help with debugging heap fragmentation. Here is an example usage: ```ruby File.open('heap.json', 'w') do |f| ObjectSpace.dump_all(output: f, full: true) end ``` The `heap.json` file contains all slots, including empty slots. [Feature #13001] [ruby-core:78468] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/benchmark.rb: Specify frozen_string_literal: true.kazu2017-01-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test for [Feature #11547]nobu2017-01-011-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* passed block should keep the lambda-nessnobu2017-01-011-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: fix return in lambdanobu2016-12-311-0/+20
| | | | | | | | | * vm.c (invoke_block_from_c_splattable): pass lambda-ness. * vm_eval.c (yield_under): invoke lambda proc properly. [ruby-core:78917] [Bug #13090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: memory leak in gcdnobu2016-12-301-0/+10
| | | | | | | | * rational.c (rb_gcd_gmp): fix memory leak. patched by KISHIMOTO, Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934]. [Bug #13089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_pack.rb: fix test case added by r57187rhe2016-12-291-1/+1
| | | | | | | | | | | | The test case for String#unpack added by r57187 is not properly testing because the String will be filled after the block invocation. [ruby-core:78841] [Bug #13075] Thanks to nagachika for pointing this out: http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: fix for mathnnobu2016-12-291-0/+9
| | | | | | | * rational.c (read_num, read_rat_nos): dispatch by the type of numerator, for mathn. [ruby-core:78893] [Bug #13084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: reduce fdivnobu2016-12-281-0/+7
| | | | | | | * numeric.c (rb_int_fdiv_double): reduce first for more precise result. [ruby-core:78886] [Bug #13078] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: ARGF fd leaknobu2016-12-271-1/+7
| | | | | | | * io.c (argf_next_argv): fix leak of fd after breaking in #each method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: fix race between read and closenobu2016-12-261-0/+30
| | | | | | | | * io.c (io_fillbuf): fix race between read and close, in the case the IO gets closed before the reading thread achieve the lock. [ruby-core:78845] [Bug #13076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: preserve cmdarg stacknobu2016-12-261-0/+9
| | | | | | | * parse.y (do_body): preserve cmdarg stack around do/end block. [ruby-core:78837] [Bug #13073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: Symbol#to_proc and instance_execnobu2016-12-261-0/+6
| | | | | | | * vm_eval.c (yield_under): should evaluate the proc on the first argument. [ruby-core:78839] [Bug #13074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_symbol.rb: use begin;end; hacknobu2016-12-261-9/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pack.c: avoid returning uninitialized Stringrhe2016-12-261-0/+8
| | | | | | | | | | Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an uninitialized String to Ruby before filling the content bytes. Fixes r11175 ("pack.c (pack_unpack): execute block if given with unpacked value instead of creating an array", 2006-10-15). [ruby-core:78841] [Bug #13075] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: CRLF in paragraph modenobu2016-12-251-0/+10
| | | | | | | * string.c (rb_str_enumerate_lines): allow CRLF to separate paragraphs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: consistent paragraph mode with IOnobu2016-12-251-6/+6
| | | | | | | | * string.c (rb_str_enumerate_lines): in paragraph mode, do not include newlines which separate paragraphs, so that it will be consistent with IO#each_line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: restore parallel optionnobu2016-12-241-0/+2
| | | | | | | * test/lib/test/unit.rb (_run_parallel): restore parallel option after retrying for --repeat-count option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: --subprocess-timeout-scale optionnobu2016-12-242-0/+24
| | | | | | | | | | * test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess timeout scaling factor. * test/lib/test/unit.rb (Test::Unit::SubprocessOption): add --subprocess-timeout-scale option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: --repeat-count optionnobu2016-12-242-13/+40
| | | | | | | * test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count option to repeat COUNT times while success. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Increase timeoutnaruse2016-12-231-1/+1
| | | | | | http://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20161223T113301Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: prepare_syntax_checknobu2016-12-231-22/+17
| | | | | | | | * test/lib/test/unit/assertions.rb (prepare_syntax_check): extract common preparation of arguments from assert_valid_syntax and assert_syntax_error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: syntax check by iseqnobu2016-12-231-14/+6
| | | | | | | | | | | * test/lib/test/unit/assertions.rb (assert_valid_syntax): use RubyVM::InstructionSequence.compile to get rid of executing the code, instead of catch&throw. sample/trick2015/kinaba/entry.rb no longer raises an Invalid return. * test/lib/test/unit/assertions.rb (assert_syntax_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_modify_expand.rb: skip if no overflownobu2016-12-221-0/+1
| | | | | | | | * test/-ext-/string/test_modify_expand.rb (test_integer_overflow): no longer happens on platforms where size_t is larger than long, e.g. 64bit windows, since r57122. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_float.rb: add test cases for Float#roundyui-knk2016-12-221-0/+21
| | | | | | | * test_float.rb: add test cases for Float#round with half nil. Follow up r57130. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rinda.rb: ipv6_mcnobu2016-12-221-25/+25
| | | | | | | * test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6 multicast setup and cleanup, and ignore ENETDOWN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bigdecimal: version 1.3.0mrkn2016-12-211-1/+39
| | | | | | | | Import bigdecimal version 1.3.0. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: refine num_exact error messagenobu2016-12-211-0/+10
| | | | | | | * time.c (num_exact): show the original argument when conversion failed, instead of intermediate nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c: fix circular causenobu2016-12-211-0/+20
| | | | | | | * eval.c (exc_setup_cause): always set cause of cause to get rid of circular references. [ruby-core:78688] [Bug #13043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: toplevel returnnobu2016-12-211-0/+23
| | | | | | | * compile.c (iseq_compile_each): stop execution of the current source by toplevel return. [ruby-core:36785] [Feature #4840] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: allow nil as rounding mode optionnobu2016-12-211-2/+2
| | | | | | | * numeric.c (rb_num_get_rounding_option): allow nil same as the default behavior, per [ruby-core:77961]. [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: attempt to close unfinished zstream; reset forced.naruse2016-12-201-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Zlib.gzip uses kwargs instead of argc [Feature #13020]naruse2016-12-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: update argf linenonobu2016-12-201-7/+10
| | | | | | | * io.c (argf_rewind): rewind line number in non-global ARGF instance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: update argf linenonobu2016-12-201-0/+12
| | | | | | | * io.c (argf_block_call_line): update line number in non-global ARGF instance. [ruby-core:78728] [Bug #13051] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c: consider the case of RMatch::regexp is nilrhe2016-12-201-3/+19
| | | | | | | | Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always contains a valid Regexp instance; it will be Qnil if the MatchData is created by rb_backref_set_string(). [ruby-core:78741] [Bug #13054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: do not resize to less than 0rhe2016-12-201-0/+5
| | | | | | | | | Shrinking the Array from the block invoked by Array#select! or Array#reject! causes the Array to be a negative number size. Ensure that the resulting Array won't be smaller than 0. [ruby-core:78739] [Bug #13053] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: check array length every time after yieldingrhe2016-12-201-3/+10
| | | | | | | | | | | Since the Array may be modified during rb_yield(), the length before invoking the block can't be trusted. Fix possible out-of-bounds read in Array#combination and Array#repeated_combination. It may better to make a defensive copy of the Array, but for now let's follow what Array#permutation does. [ruby-core:78738] [Bug #13052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: separator [ci skip]nobu2016-12-201-0/+1
| | | | | | | * test/lib/test/unit.rb (ExcludesOption#setup_options): add separator for --excludes-dir in help message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Increase timeoutnaruse2016-12-181-3/+3
| | | | | | http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161215T021909Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c: fix width underflownobu2016-12-171-0/+5
| | | | | | | * sprintf.c (rb_str_format): fix memory corruption by width underflow. https://github.com/mruby/mruby/issues/3347 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Increase timeoutnaruse2016-12-171-1/+1
| | | | | | http://rubyci.org/logs/13.78.52.201/vc12-x64/ruby-trunk/log/20161217T103523Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e