summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2018-04-19dir.c: warning for NULnobu
* 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
2018-04-16string.c: fix dumped suffixnobu
* 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
2018-03-31use requrie_relativenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-31use require_relativenobu
* 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
2018-03-31file_types.rb: use the current terminal devicenobu
* 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
2018-03-26Update to ruby/spec@a585ec3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-26Update to ruby/mspec@8b54bf3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-23parse.y: else without rescuenobu
* 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
2018-03-13Bug Fix Enumerator::Lazy#uniq state for multiple callnobu
* 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
2018-03-12Fix setting method visibility on method wrapped with prependnobu
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
2018-03-05required paths are real pathsnobu
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
2018-03-04Update to ruby/spec@c1b568beregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@51f301deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@cbe855ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/mspec@d287466eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26r62071 is backported into Ruby 2.5 [Bug #14407]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26Check the result of to_int in Kernel#Integermrkn
[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
2018-02-25Add a new #filter alias for #selecteregon
* 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
2018-02-23groups_spec.rb: get rid of limit on macOSnobu
* 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
2018-02-23Use Process::Tmsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22erb.rb: deprecate safe_level of ERB.newk0kubun
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
2018-01-30skip EINVAL on unsupported platformko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29Update to ruby/spec@83063a3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29Update to ruby/mspec@5d49a6ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27defined? returns nil for toplevel constant lookupnobu
* variable.c (rb_const_defined_0): toplevel constant lookup has been removed, should return nil too. [ruby-core:85142] [Bug #14407] [Fix GH-1800] From: Gonzalo <grzuy0@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26Fix rubyspec against the change in Hash#transform_keys!mrkn
[Bug #14380] [ruby-core:84951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-25Group related File.umask specs togethereregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-25Remove specs trying arbitrary values for chmod and umaskeregon
* Instead assert that too large values raise RangeError. * [Bug #14375] [ruby-core:84933] * See https://github.com/ruby/ruby/pull/1797 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-24system_spec.rb: add RubySpec for r62025k0kubun
NEWS: added an entry for `exception: true` option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-19r61950 changes mode_t to ushort on FreeBSD and Darwinnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-11matrix.rb: add Matrix#antisymmetric?stomar
* lib/matrix.rb: add Matrix#antisymmetric?. Proposed by Yilo (@yiloo). Patch by Marcus Stollsteimer (@stomar). [Fix GH-1788] * spec/ruby/library/matrix/antisymmetric_spec.rb: add specs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10spec/: skip some specs so that no failure occurs in root privilegemame
Follow up of r61757, This change makes `sudo make test-spec` pass on my machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected resultmame
It had used `id -un`, but it is not always equal to `Etc.getlogin`. `id` returns the current user of the process, and `Etc.getlogin` returns the user name logged in on the controlling terminal of the process. This change uses `logname` by default. `id` remains as a fallback since there seem to be some platforms where `logname` is not available: https://github.com/ruby/spec/commit/49576b417ca3704cfb8271d2545c06c076c10cbc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/spec@b95d7ederegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/spec@0fe33aceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/mspec@5f563e4eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27spec_helper.rb: libruby.so iff enable-sharednobu
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): search libruby.so only when enable-shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27spec_helper.rb: must find libruby.sonobu
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if libruby.so should have been built but is not found, fail early. get mtime of the library just once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22Postponing the Bundler merge.hsbt
I faced a big issue about Bundler with ruby core. I have no time to resolve it issue before 2.5 final release. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21Simplify Thread#[]= speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21Merge release version of bundler-1.16.1 from upstream.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20fix threading bug.ko1
* spec/ruby/core/thread/element_set_spec.rb: `t` can be uninitialized. Use `Thread.current` explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Use syswrite to avoid potential buffering in IO#select speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15Update to ruby/spec@595645feregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15Update to ruby/mspec@19d929eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14The main Thread should have report_on_exception=true for consistencyeregon
* Adapt test and add specs. * See [Feature #14143] [ruby-core:84227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Set Thread.report_on_exception=true by default to report exceptions in Threadseregon
* [Feature #14143] [ruby-core:83979] * vm.c (vm_init2): Set Thread.report_on_exception to true. * thread.c (thread_start_func_2): Add indication the message is caused by report_on_exception = true. * spec/ruby: Specify the new behavior. * test/ruby/test_thread.rb: Adapt and improve tests for Thread.report_on_exception and Thread#report_on_exception. * test/ruby/test_thread.rb, test/ruby/test_exception.rb: Unset report_on_exception for tests expecting no extra output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12ignore lines (to catch up r61155).ko1
* spec/ruby/library/net/ftp/return_code_spec.rb: check message body only. * spec/ruby/library/net/http/http/set_debug_output_spec.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e