aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby
Commit message (Collapse)AuthorAgeFilesLines
* Update to ruby/spec@41068a6eregon2018-06-273-52/+52
| | | | | | * Only small fixes to specs from CRuby to review the diff more easily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (waitpid_wait): do not set ECHILD prematurelynormal2018-06-272-2/+14
| | | | | | | | | | | | It is possible to have both MJIT and normal child processes alive, so we cannot set ECHILD based on such a guess. We can still elide waitpid(PID <= 0) calls if we have callers in vm->waiting_pids, however. For specs, ensure Process.waitall does not leak MJIT PIDs to Rubyspace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "spec: skip Process wait specs on MJIT"normal2018-06-273-110/+104
| | | | | | This reverts r63731 (commit 359dd59db2512d801bb983f98bede4fc598f139a). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec: skip Process wait specs on MJITk0kubun2018-06-234-104/+111
| | | | | | | until [Bug #14867] is fixed. I want to start running CI with MJIT enabled before fixing the problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip when group name is not foundnobu2018-06-202-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* describe about NameError by #private_constantnobu2018-06-191-0/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NULL class Data_Wrap_Struct is not allowed.ko12018-06-192-12/+0
| | | | | | | | | | | * spec/ruby/optional/capi/typed_data_spec.rb: same as r63692. * spec/ruby/optional/capi/ext/typed_data_spec.c: ditto. * vm_insnhelper.h (PUSH): re-enable assertion to check hidden objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed unobservable behaviornobu2018-06-182-12/+0
| | | | | | | The klass for Data_Wrap_Struct can be NULL, but it MUST NOT appear in the Ruby level. It is only for the C level implementation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compare with correct valuesnobu2018-06-171-3/+3
| | | | | | | * spec/ruby/shared/rational/exponent.rb: compare with mathematically expected values without errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove warnings of flip-flop deprecation from tests and specsmame2018-06-153-10/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* HTTPServerException is deprecatedusa2018-06-146-9/+57
| | | | | | | | | * spec/ruby/library/net/http/HTTPClientException_spec.rb: add. * spec/ruby/library/net/http/HTTPServerException_spec.rb: check deprecated message. * spec/ruby/library/net/http/httpresponse/*_spec.rb: use HTTPClientException instead of HTTPServerException. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2018-06-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@4bb0f25eregon2018-06-1324-57/+812
| | | | | | * Specs added by TruffleRuby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@4bc7a2beregon2018-06-1324-288/+1195
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* String#uminus dedupes unconditionallynormal2018-06-041-5/+3
| | | | | | | | [Feature #14478] [ruby-core:85669] Thanks-to: Sam Saffron <sam.saffron@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add TracePoint#parametersmame2018-06-031-0/+21
| | | | | | | | | | | It can be used to get the parameters' information of method and block. There was no way to get block parameters. It was possible but ineffective to get method parameters via Method object: `tp.defined_class.method(tp.method_id).parameters` TracePoint#parameters allows us to get the information easily. [Feature #14694] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: Add a new alias `then` to `Kernel#yield_self`; [Feature #14594]matz2018-05-301-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby: revert r63503 and r63508nobu2018-05-292-18/+3
| | | | | | | | When RUBY_DESCRIPTION has `+JIT` already, it will be doubled. Just fake.rb.in always has copied `RUBY_DESCRIPTION`, regardless MJIT is enabled or not. `BOOTSTRAPRUBY` is not involved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Specs must keep working on older versions and other implementationseregon2018-05-272-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby: fix RUBY_DESCRIPTION check with JIT enabledk0kubun2018-05-242-3/+18
| | | | | | | | | | | | | `make test-spec` adds `-r./$(arch)-fake` to pass header options. But the $(arch)-fake.rb unexpectedly modifies RUBY_DESCRIPTION and it always drops +JIT from it since the fake.rb is built with BOOTSTRAPRUBY, which can be miniruby. miniruby can't find MJIT header and thus mjit_init_p is always FALSE. So, to pass `make test-spec` with JIT enabled, we can't use RUBY_DESCRIPTION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: === by cover?nobu2018-05-171-4/+13
| | | | | | | * range.c (range_eqq): switch `Range#===` to use `cover?` instead of `include?`. [Feature #14575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * spec/ruby/command_line/dash_upper_i_spec.rb: skip symlink on Windows likeusa2018-04-291-12/+14
| | | | | | | other specs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Generalize the check to MRI in the -I speceregon2018-04-281-1/+1
| | | | | | * The current check seems to fail with AppVeyor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Ignore the extension of miniruby on Windows in the -I speceregon2018-04-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@6f38a82eregon2018-04-28145-2442/+2693
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rexml: disable XPath 1.0 compatible "#{ELEMENT_NAME}" processing by defaultkou2018-04-283-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | It breaks backward compatibility than I thought. So it's disabled by default. It means that REXML's XPath processor isn't compatible with XPath 1.0. But it will be acceptable for users. We can enable it by specifying "strict: true" to REXML::XPathParser.new explicitly. * lib/rexml/xpath.rb, lib/rexml/xpath_parser.rb: Accept "strict: true" option. * test/rexml/test_contrib.rb, test/rexml/xpath/test_base.rb: Use not XPath 1.0 compatible behavior. * test/rexml/test_jaxen.rb: Use XPath 1.0 compatible behavior. * test/rss/test_1.0.rb, test/rss/test_dublincore.rb, spec/ruby/library/rexml/element/namespace_spec.rb, spec/ruby/library/rexml/element/namespaces_spec.rb, spec/ruby/library/rexml/element/prefixes_spec.rb: Enable again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Avoid "should_not raise_error" in Thread#raise speceregon2018-04-251-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix style in Thread#raise speceregon2018-04-251-8/+8
| | | | | | * Add space after { and before }. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Thread.pass in loop{} to check interrupts more ofteneregon2018-04-251-1/+1
| | | | | | * The spec now runs in ~5ms vs ~100ms before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Same as the last commit (comment out tests for CI).ko12018-04-222-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip some tests to make CI healthy.ko12018-04-221-0/+3
| | | | | | | | | | | | r63236 (or r63237) introduces test failures and CI shows errors. This commit makes skipping these tests. Please revert this commit after tests (and rubyspec) work fine. Failure log example: https://gist.github.com/ko1/8456cf25fe35a696bd33ac86135092e4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: warning for NULnobu2018-04-191-3/+5
| | | | | | | * dir.c (rb_push_glob): warn NUL-separated glob patterns. [Feature #14643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix dumped suffixnobu2018-04-161-2/+2
| | | | | | | * string.c (rb_str_dump): get rid of an error on evaling with frozen-string-literal enabled. [ruby-core:86539] [Bug #14687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use requrie_relativenobu2018-03-312-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use require_relativenobu2018-03-311-2/+2
| | | | | | | | * spec/ruby/core/file/ftype_spec.rb: use require_relative which resolves symbolic links consistently to git rid of constant re-definition warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file_types.rb: use the current terminal devicenobu2018-03-311-1/+1
| | | | | | | | | * spec/ruby/core/file/fixtures/file_types.rb (configure_types): try the current standard input terminal device first to get rid of a race condition. other terminal devices may be used by other processes and disposed during the test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@a585ec3eregon2018-03-267-59/+103
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: else without rescuenobu2018-03-231-5/+13
| | | | | | | | | | | | | | | | * parse.y (bodystmt): [EXPERIMENTAL] make `else` without `rescue` a syntax error. [DevelopersMeeting20180315Japan] https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20180315Japan https://docs.google.com/document/d/1RT0ijSo8uJ4Awn3CEvuYkjH0TVeXSYgeAFNmVGYC3ak/edit# > * do-else-end > https://twitter.com/joker1007/status/974173396006129664 > https://twitter.com/joker1007/status/974173641347756032 > https://twitter.com/joker1007/status/974176512554369027 > Will be SyntaxError in 2.6-preview2 > All of begin/do/def (experimental) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bug Fix Enumerator::Lazy#uniq state for multiple callnobu2018-03-131-0/+31
| | | | | | | | | | | | | | | | | | | | | | * enumerator.c (lazy_uniq_i): create new hash for each calls. [Fix GH-1820] Currently 2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10} => #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq> 2.5.0-preview1 :002 > arr.to_a => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 2.5.0-preview1 :003 > arr.to_a => [] Expected arr.to_a to always return same output From: Anmol Chopra <anmolchopra@rocketbox.in> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix setting method visibility on method wrapped with prependnobu2018-03-121-0/+39
| | | | | | | | | | Ignore prepended modules when looking for already defined methods on a class to set the visibility on. [Fix GH-1834] From: Dylan Thacker-Smith <Dylan.Smith@shopify.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* required paths are real pathsnobu2018-03-053-6/+6
| | | | | | | Fix `test-spec` failures when the build directory is a symbolic link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@c1b568beregon2018-03-043689-6096/+6095
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@51f301deregon2018-02-272-6/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@cbe855ceregon2018-02-2738-177/+185
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* r62071 is backported into Ruby 2.5 [Bug #14407]naruse2018-02-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Check the result of to_int in Kernel#Integermrkn2018-02-261-5/+12
| | | | | | | | | | | | | [ruby-core:85813] [Bug #14552] * object.c (rb_convert_to_integer): Check the result of to_int in Kernel#Integer * test/ruby/test_integer.rb: add tests. * spec/ruby/core/kernel/Integer_spec.rb: fix examples. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a new #filter alias for #selecteregon2018-02-2513-168/+253
| | | | | | | | | | | | | | | * In Enumerable, Enumerator::Lazy, Array, Hash and Set [Feature #13784] [ruby-core:82285] * Share specs for the various #select#select! methods and reuse them for #filter/#filter!. * Add corresponding filter tests for select tests. * Update NEWS. [Fix GH-1824] From: Alexander Patrick <adp90@case.edu> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* groups_spec.rb: get rid of limit on macOSnobu2018-02-231-2/+1
| | | | | | | | | * spec/ruby/core/process/groups_spec.rb: on macOS, getgroups(2) has a variant which has no limit but not setgroups(2). so the default groups may exceed the limit. as the call of setgroups is expected to fail here, the content does not matter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Process::Tmsnobu2018-02-238-13/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* erb.rb: deprecate safe_level of ERB.newk0kubun2018-02-222-13/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e