Граф коммитов

225 Коммитов

Автор SHA1 Сообщение Дата
ko1 68e2a2e5ce skip EINVAL on unsupported platform
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 02:21:59 +00:00
eregon 3fa5bd38af Update to ruby/spec@83063a3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 16:08:16 +00:00
eregon 6fd1a18f8a Update to ruby/mspec@5d49a6c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29 16:07:35 +00:00
nobu 9473f86fb0 defined? returns nil for toplevel constant lookup
* 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-27 06:12:09 +00:00
mrkn 9c7caa3be5 Fix rubyspec against the change in Hash#transform_keys!
[Bug #14380] [ruby-core:84951]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26 02:01:47 +00:00
eregon b101d2c2b1 Group related File.umask specs together
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-25 09:50:41 +00:00
eregon 7dc0bdb6e5 Remove specs trying arbitrary values for chmod and umask
* 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-25 09:50:29 +00:00
k0kubun c50220619b system_spec.rb: add RubySpec for r62025
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-24 14:31:40 +00:00
naruse c151679cc3 r61950 changes mode_t to ushort on FreeBSD and Darwin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-19 18:55:32 +00:00
stomar 3b51e3a11f matrix.rb: add Matrix#antisymmetric?
* 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-11 19:36:30 +00:00
mame 205f0dcf3a spec/: skip some specs so that no failure occurs in root privilege
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-10 13:30:25 +00:00
mame 5d0103f973 spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected result
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:
49576b417c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10 13:30:22 +00:00
ko1 c39bdb798d `$SAFE` as a process global state. [Feature #14250]
* 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-28 20:09:24 +00:00
eregon 74f14d6921 Update to ruby/spec@b95d7ed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 21:18:20 +00:00
eregon a34db218ad Update to ruby/spec@0fe33ac
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 16:12:47 +00:00
eregon 76402dfa06 Update to ruby/mspec@5f563e4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 16:12:18 +00:00
nobu e1f834f9b4 spec_helper.rb: libruby.so iff enable-shared
* 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-27 07:28:32 +00:00
nobu a1695d9c2c spec_helper.rb: must find libruby.so
* 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-27 01:58:18 +00:00
hsbt 7825e8363d Postponing the Bundler merge.
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-22 23:08:05 +00:00
eregon 82d63fcaac Simplify Thread#[]= spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:29:18 +00:00
hsbt 4525cf2cd5 Merge release version of bundler-1.16.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:22:15 +00:00
ko1 b895c402a5 fix threading bug.
* 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-20 23:49:30 +00:00
eregon 494b3aeaea Use syswrite to avoid potential buffering in IO#select spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18 16:41:48 +00:00
marcandre 907508b25f Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17 18:19:41 +00:00
eregon 30ed82e772 Update to ruby/spec@595645f
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 17:44:37 +00:00
eregon 60e21a9e93 Update to ruby/mspec@19d929e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15 17:44:15 +00:00
eregon 2e315baf48 The main Thread should have report_on_exception=true for consistency
* 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-14 13:08:02 +00:00
eregon 5a3c024df0 Set Thread.report_on_exception=true by default to report exceptions in Threads
* [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-12 18:43:42 +00:00
ko1 6c49079ea2 ignore lines (to catch up r61155).
* 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
2017-12-12 12:40:41 +00:00
k0kubun 02015974a3 struct.c: add keyword_init option to Struct.new
to initialize struct with keyword arguments.

[Feature #11925] [close GH-1771]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 08:12:43 +00:00
svn 0d862f34a8 * remove trailing spaces, append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 06:15:45 +00:00
hsbt a1a20cfaa2 Merge 1-16-stable branch of bundler.
It's rc version for bundler-1.16.1. I'm going to update it version
  after official release from bundler team.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 06:15:44 +00:00
ko1 a1061f557b catch up r61131.
* spec/ruby/core/kernel/autoload_spec.rb: should use FrozenError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 00:56:24 +00:00
marcandre a9770bac63 Add case equality arity to Enumerable#all?, any?, none? and one?,
and specialized Array#any? and Hash#any?
Based on patch by D.E. Akers [#11286]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-10 22:36:28 +00:00
hsbt c02174354e Follow up r60970 for bundler's examples.
r60970 break Gemfile.lock format with file protocol after bundle
  install/update. I addd hostname to these examples.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07 08:08:56 +00:00
eregon d209b4c0a2 Update to ruby/spec@e2d0d1e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 17:51:16 +00:00
svn 60775cc48a * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 15:41:52 +00:00
eregon 4d7b0b9112 Update to ruby/spec@bacedc5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 15:41:50 +00:00
eregon 821d9a2d30 Update to ruby/mspec@b501ade
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01 15:41:23 +00:00
marcandre 87bcbf9ef5 Cherrypick 9f8d3d0 from ruby/spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29 19:46:46 +00:00
nobu b8d15b7e47 spec/ruby/optional/capi/constants_spec.rb: Data is deprecated now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29 10:38:36 +00:00
hsbt 6918546499 Ignored `bundle_ruby` example with Ruby core.
It was ignored with Bundler-1.15.x. It's regression at r60603.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 05:38:48 +00:00
svn 3cac7256e5 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19 15:15:32 +00:00
eregon bd69f8e11c Add specs for concurrent Module#autoload
* When the file does not exist or the constant is not set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19 15:15:31 +00:00
eregon 578e760a8b Reorganize Module#autoload to have similar specs next to each other
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-19 15:15:12 +00:00
nobu 8c15f40acf parse.y: no return in class
* parse.y (k_return): prohibit return in class/module body except
  for singleton class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16 05:36:42 +00:00
kazu 7b7243e5a9 Modify spell miss.
Runing -> Running

Author:    TomoyukiNakagawa <nakagawa.tomoyuki@gmail.com>
[Fix GH-1741] [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-05 15:10:41 +00:00
eregon e7535c6eaa Workaround Travis CI issue by hardcoding localhost
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04 17:48:51 +00:00
nobu 996468de00 load from relative path to __FILE__
* spec/ruby/library/pathname/empty_spec.rb: load spec_helper from
  relative path to `__FILE__` same as other spec files, instead of
  `__dir__` in which symlinks are resolved, to get rid of constant
  redefinition warning when `srcdir` contains symlinks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-04 01:48:45 +00:00
usa f35fb6d36c Support Windows
* spec/bundler/spec_helper.rb: there are no reason to refuse ':' and '-' in the
  path of spec files.  especially, ':' is always contained on Windows.

* spec/bundler/spec/helper.rb: open3.rb is also supported on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02 04:28:30 +00:00