aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
* re-skip tests of GC.compact.Koichi Sasada2019-05-211-0/+2
|
* enable test for GC.compact to reproduce an issue on CIKoichi Sasada2019-05-211-2/+0
|
* Do not modify shared arrayNobuyoshi Nakada2019-05-211-1/+0
| | | | [Bug #15821]
* Simplified the guard against old versionsNobuyoshi Nakada2019-05-211-5/+2
|
* skip a test to pass CIs.Koichi Sasada2019-05-181-0/+1
| | | | | I'm debugging [Bug #15821] but my patch introduces another issue. So I simply skip this test and re-enable it later.
* Add test for UNTILNobuyoshi Nakada2019-05-181-0/+12
|
* Distinguish pre-condition and post-condition loopsNobuyoshi Nakada2019-05-181-0/+12
|
* skip tests for GC.compact to pass CI.Koichi Sasada2019-05-171-0/+2
| | | | | Now, GC.compact has issues which makes rubyci RED, so I skip this test and debug soon.
* Test to disable ASCII-only optimizationNobuyoshi Nakada2019-05-171-0/+10
| | | | | | | Examples why ASCII-only optimization cannot apply multi-byte encodings which have 7-bit trailing bytes. Suggested by @duerst at https://github.com/ruby/ruby/pull/2187#issuecomment-492949218
* Add object packing strategies for compactionAaron Patterson2019-05-141-3/+4
| | | | | | | | This commit adds an alternative packing strategy for compaction. Instead of packing towards "most pinned" pages, we can pack towards "most empty" pages. The idea is that we can double the heap size, then pack all objects towards the empty side of the heap. This will ensure maximum chaos for testing / verification.
* Avoid triggering autoload in Module#const_defined?(String)Jean Boussier2019-05-071-0/+6
| | | | [Bug #15780]
* Fix use of numbered parameter inside proc that is default value of optargJeremy Evans2019-05-051-0/+2
| | | | | | | | | | | | | | | | This allows cases such as: ```ruby m ->(a = ->{@1}) {a} m.call.call(1) m2 ->(a: ->{@1}) {a} m2.call.call(2) ``` Previously, this would cause a syntax error. [Bug#15789]
* Fix a case where numbered parameters should not be allowedJeremy Evans2019-05-051-0/+2
| | | | | | | | | | | | | | | | | | Because `proc{|| @1}` is a syntax error, the following should also be syntax errors: ```ruby proc { | | @1} ``` ```ruby proc { |; a| @1 } ``` This fixes both cases. [Bug #15825]
* parse.y: duplicated when clause warningNobuyoshi Nakada2019-05-051-3/+14
| | | | | * parse.y (case_args): moved "duplicated when clause" warning from compile phase, so that `ruby -wc` shows them.
* Add exception support in `Range#first`.manga_osyo2019-05-011-0/+2
| | | | Closes: https://github.com/ruby/ruby/pull/2163
* Disallow also CR in here-doc identifierNobuyoshi Nakada2019-04-291-0/+6
| | | | | | * parse.y (heredoc_identifier): CR in here-document identifier might or might not result in a syntax error, by the EOL code. make a syntax error regardless of the EOL code.
* parse.y: fix here-doc identifier with newlineNobuyoshi Nakada2019-04-291-4/+3
| | | | | | | | | | | | | | | * parse.y (heredoc_identifier): quoted here-document identifier must end within the same line. the only corner case that here-document identifier can contain a newline is that the closing qoute is placed at the beginning of the next line, and has been warned since 2.4. ```ruby <<"EOS " # warning: here document identifier ends with a newline EOS ```
* numeric.c: Extend Integer#[] to support range argumentsYusuke Endoh2019-04-281-0/+25
| | | | | | | | | | | ```` 0b01001101[2, 4] #=> 0b0011 0b01001100[2..5] #=> 0b0011 0b01001100[2...6] #=> 0b0011 ^^^^ ```` [Feature #8842]
* test/ruby/test_integer.rb: Add a sane test for Integer#[]Yusuke Endoh2019-04-281-0/+14
|
* Always mark the string returned by File.realpath as taintedJeremy Evans2019-04-281-1/+1
| | | | | | | | | | | | | | | | | This string can include elements that were not in either string passed to File.realpath, even if one of the strings is an absolute path, due to symlinks: ```ruby Dir.mkdir('b') unless File.directory?('b') File.write('b/a', '') unless File.file?('b/a') File.symlink('b', 'c') unless File.symlink?('c') path = File.realpath('c/a'.untaint, Dir.pwd.untaint) path # "/home/testr/ruby/b/a" path.tainted? # should be true, as 'b' comes from file system ``` [Bug #15803]
* Get rid of indirect sharingNobuyoshi Nakada2019-04-271-0/+9
| | | | | | | | | * string.c (str_duplicate): share the root shared string if the original string is already sharing, so that all shared strings refer the root shared string directly. indirect sharing can cause a dangling pointer. [Bug #15792]
* Hide internal IDsNobuyoshi Nakada2019-04-262-0/+8
| | | | | | | | * parse.y (internal_id): number the ID serial for internal use by counting down from the neary maximum value, not to accidentally match permanent IDs. [Bug #15768]
* Fix typos [ci skip]Kazuhiro NISHIYAMA2019-04-251-7/+7
|
* Defer setting gc_stress until inits doneNobuyoshi Nakada2019-04-241-0/+4
| | | | [Bug #15784]
* Fix complex hash keys to work with compactionAaron Patterson2019-04-231-0/+7
| | | | | | | | | For example when an array containing objects is a hash key, the contents of the array may move which can cause the hash value for the array to change. This commit makes the default `hash` value based off the object id, so the hash value will remain stable. Fixes test/shell/test_command_processor.rb
* Disallow numbered parameter as the default value of optional argumentSeiei Miyagi2019-04-231-0/+1
| | | | [Fix GH-2139] [Bug #15783]
* Fix internal error of `->x:@2{}`Seiei Miyagi2019-04-231-0/+1
| | | | [Fix GH-2139] [Bug #15783]
* test/ruby/test_pattern_matching.rb: add missing tests for NODE_DASGN, NODE_LASGNktsj2019-04-211-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing test for p_var_refktsj2019-04-211-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing tests for p_argsktsj2019-04-211-0/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip test until we can guarantee movement of certain objectstenderlove2019-04-201-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip test if mjit is enabledtenderlove2019-04-201-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Workaround Wercker check which is not working nowk0kubun2019-04-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip test_find_collided_object on problematic CIs for nowk0kubun2019-04-201-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add `Time#floor`nobu2019-04-201-0/+26
| | | | | | | | | [Feature #15653] [Fix GH-2092] From: manga_osyo <manga.osyo@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add more assertions around moved objecttenderlove2019-04-201-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check the index rather than includetenderlove2019-04-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Try harder to make objects movetenderlove2019-04-201-23/+35
| | | | | | | Sometimes the objects we allocated may not get compacted. This change is to increase the likelyhood that they will move git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add `GC.compact` again.tenderlove2019-04-202-0/+98
| | | | | | 🙏 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: added in: option to Time.nownobu2019-04-191-0/+5
| | | | | | | * time.c (time_s_now): added in: option to Time.now as well as Time.at. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: warn non-nil $,nobu2019-04-181-1/+1
| | | | | | | | * array.c (rb_ary_join_m): warn use of non-nil $,. * io.c (rb_output_fs_setter): warn when set to non-nil value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warningsnobu2019-04-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: warn non-nil $;nobu2019-04-181-3/+10
| | | | | | | | * string.c (rb_str_split_m): warn use of non-nil $;. * string.c (rb_fs_setter): warn when set to non-nil value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reverting compaction for nowtenderlove2019-04-171-97/+0
| | | | | | For some reason symbols (or classes) are being overridden in trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warning in assertion tookazu2019-04-171-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warnings in `make test-all`kazu2019-04-171-0/+7
| | | | | | suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Define Struct#deconstructktsj2019-04-171-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce pattern matching [EXPERIMENTAL]ktsj2019-04-171-0/+1075
| | | | | | [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* call verification method in addition to compactiontenderlove2019-04-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding `GC.compact` and compacting GC support.tenderlove2019-04-171-0/+97
| | | | | | | | | | | This commit adds the new method `GC.compact` and compacting GC support. Please see this issue for caveats: https://bugs.ruby-lang.org/issues/15626 [Feature #15626] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e