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

604 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 8b39df854d
Let irb use an empty file as irbrc
to get rid of side-effect by existing .irbrc file.
2019-05-31 16:32:27 +09:00
Nobuyoshi Nakada b632566d33
UNIX domain socket name length has a certain limit 2019-05-31 16:32:27 +09:00
Benoit Daloze a4161b7649 Update to ruby/spec@0ba5312 2019-05-30 22:11:24 +02:00
Benoit Daloze e935a3227d Update to ruby/mspec@3cc36d0 2019-05-30 22:11:22 +02:00
Takashi Kokubun 5379ca9250
Skip spec broken since a66bc2c011
This has not worked since the merge https://travis-ci.org/ruby/ruby/jobs/538438184
2019-05-29 14:57:25 +09:00
Nobuyoshi Nakada 8552e9d696
Fix shorten-64-to-32 warning 2019-05-29 13:24:24 +09:00
Benoit Daloze 91f5a8db59 Update to ruby/spec@0c5c5c1 2019-05-28 23:15:57 +02:00
Benoit Daloze a66bc2c011 Update to ruby/spec@9a501a8 2019-05-28 22:41:48 +02:00
Jeremy Evans 39eadca76b Add FrozenError#receiver
Similar to NameError#receiver, this returns the object on which
the modification was attempted.  This is useful as it can pinpoint
exactly what is frozen.  In many cases when a FrozenError is
raised, you cannot determine from the context which object is
frozen that you attempted to modify.

Users of the current rb_error_frozen C function will have to switch
to using rb_error_frozen_object or the new rb_frozen_error_raise
in order to set the receiver of the FrozenError.

To allow the receiver to be set from Ruby, support an optional
second argument to FrozenError#initialize.

Implements [Feature #15751]
2019-05-26 11:09:21 -07:00
Benoit Daloze 2d34087a38 Add notes for the Process#clock_getres spec 2019-05-24 14:48:10 +02:00
Benoit Daloze 4541d2effe Only exclude the failing clocks for Process.clock_getres specs on AIX
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20190522T103301Z.fail.html.gz
2019-05-24 14:29:47 +02:00
Yusuke Endoh 50e993d4e3 Skip the Process.clock_getres spec on AIX
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20190522T103301Z.fail.html.gz
2019-05-24 12:17:05 +09:00
manga_osyo f5415a95ce
Add `Time#ceil`.
Closes: https://github.com/ruby/ruby/pull/2133
2019-05-23 22:30:19 +09:00
Alfonso Jiménez 0acbdd1ed0
Adding Enumerable#filter_map
[Feature #15323]
Closes: https://github.com/ruby/ruby/pull/2017
2019-05-23 14:39:16 +09:00
Yusuke Endoh 00f7e42451 spec/ruby/core/hash/constructor_spec.rb: add "ruby_version_is" guard
follow up for d3f1c615c5
2019-05-23 01:46:21 +09:00
Yusuke Endoh d3f1c615c5 hash.c (rb_hash_s_create): Reject `Hash[[nil]]`
The behavior of `Hash[[nil]] #=> {}` was a bug until 1.9.3, but had been
remained with a warning because some programs depended upon it.
Now, six years passed.  We can remove the compatibility behavior.
[Bug #7300]
2019-05-23 00:19:56 +09:00
Alan Wu b00f280d4b
Eagerly name modules and classes
* variable.c: make the hidden ivars `classpath` and `tmp_classpath` the source
  of truth for module and constant names. Assign to them when modules are bind
  to constants.

* variable.c: remove references to module name cache, as what used to be the cache
  is now the source of truth. Remove rb_class_path_no_cache().

* variable.c: remove the hidden ivar `classid`. This existed for the purposes of
  module name search, which is now replaced. Also, remove the associated
  rb_name_class().

* class.c: use rb_set_class_path_string to set the name of Object during boot.
  Must use a fstring as this runs before rb_cString is initialized and
  creating a normal string leads to a VALUE without a class.

* spec/ruby/core/module/name_spec.rb: add a few specs to specify what happens
  to Module#name across multiple operations. These specs pass without other
  code changes in this commit.

[Feature #15765]
2019-05-22 15:46:47 +09:00
Benoit Daloze 8c8f2d97cf Remove redundant ignore rule for Process#clock_getres specs 2019-05-20 10:41:57 +02:00
Benoit Daloze 2a34543e11 Move exclusion for Hyper-V next to other skipped constants 2019-05-20 10:41:40 +02:00
Koichi Sasada ab0f2deab1 skip a test for CLOCK_MONOTONIC_RAW.
On my Linux guest machine on Hyper-V, I got an error.
Process.clock_gettime(CLOCK_MONOTONIC_RAW, :nanosecond) returns like:

  ...
  875573945119100
  875573945119600
  ...

even if `Process.clock_getres(value, :nanosecond)` returns 1.
So I simply skip this test for CLOCK_MONOTONIC_RAW.
2019-05-20 14:43:04 +09:00
Nobuyoshi Nakada a85ed43294
Do not access the internal member 2019-05-10 09:00:25 +09:00
Nobuyoshi Nakada d736080c8b
Use ruby_bug guard 2019-05-08 15:45:13 +09:00
Takashi Kokubun a7cbb65956
Do not break rubyspec for old Ruby
Fixing 7d805e67f3
2019-05-08 15:13:34 +09:00
Jean Boussier 7d805e67f3
Avoid triggering autoload in Module#const_defined?(String)
[Bug #15780]
2019-05-07 21:20:01 +09:00
aycabta 17350c7e55 Add Reline as a fallback library for Readline
* lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible
  library.
* lib/readline.rb: Readline uses a fallback to Reline when ext/readline
  doesn't exist.
* tool/sync_default_gems.rb: add ruby/reline as a default gem.
* appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit
  of Reline, and add "--exclude readline" to "nmake test-all" on Visual
  Studio builds because of strange behavior.
* spec/ruby/library/readline/spec_helper.rb: skip Reline as with
  RbReadline.
2019-04-30 11:44:20 +09:00
NAKAMURA Usaku eb45ba6116
Skip the spec on Windows because RUBY_EXE is RUNRUBY and it calls ruby as grandchild 2019-04-30 04:09:25 +09:00
Benoit Daloze daa0874056 CLOCK_MONOTONIC_RAW_APPROX seems less precise than advertised on macOS
* https://travis-ci.org/ruby/ruby/builds/525651487
2019-04-28 23:29:49 +02:00
Benoit Daloze 79671ec57e Update to ruby/spec@7de852d 2019-04-28 23:20:11 +02:00
Benoit Daloze 994833085a Update to ruby/mspec@c25d63d 2019-04-28 23:20:09 +02:00
Benoit Daloze bbb93608a3 Move the check for CentOS CLOCK_MONOTONIC_RAW next to others
* Fixes "No behavior expectation was found in the example"
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20190428T093004Z.fail.html.gz
2019-04-28 23:17:42 +02:00
Benoit Daloze d906dd87b0 Skip CLOCK_UPTIME_RAW_APPROX since it seems less precise than advertised on macOS
* See https://travis-ci.org/ruby/ruby/jobs/525595997
2019-04-28 15:25:09 +02:00
Benoit Daloze 9426da83c6 Exclude failing Process.clock_getres specs on AIX 2019-04-28 14:59:14 +02:00
Benoit Daloze a27f7e499c Add missing platform guard 2019-04-28 14:55:30 +02:00
Benoit Daloze 9a0dbb3414 Skip problematic Process.clock_getres specs on ARM
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20190428T051708Z.fail.html.gz
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-trunk/log/20190428T045405Z.fail.html.gz
2019-04-28 14:55:30 +02:00
Benoit Daloze 13abf5519a Workaround a CentOS bug in Process.clock_getres specs 2019-04-28 14:44:12 +02:00
Benoit Daloze 16695af0ef Refactor logic in Process.clock_gettime spec 2019-04-28 14:36:03 +02:00
Benoit Daloze fc37a045a0 Fix typo in spec 2019-04-28 14:35:17 +02:00
Benoit Daloze 5d24fba544 Skip the entire Process.clock_getres spec on FreeBSD
* Clocks don't match the reported precision.
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190428T093003Z.fail.html.gz
2019-04-28 12:37:29 +02:00
Benoit Daloze 2c283655a6 Some Solaris versions seem to only provide millisecond accuracy for CLOCK_REALTIME
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20190427T182404Z.fail.html.gz
2019-04-27 23:46:08 +02:00
Benoit Daloze b7c301569d Skip clock_getres spec on BSD
* clock_getres() seems to be incorrect on BSD:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190427T183003Z.fail.html.gz
2019-04-27 23:42:31 +02:00
Benoit Daloze 0d227d1ce6 Try to more accurately reflect MRI's logic in specs for finding the home if $HOME is unset 2019-04-27 19:42:54 +02:00
Benoit Daloze 5b93321064 Update to ruby/spec@14e6148 2019-04-27 19:23:45 +02:00
Benoit Daloze a1b4816759 Update to ruby/spec@15c9619 2019-04-27 18:53:23 +02:00
Benoit Daloze 00c33d9c23 Update to ruby/mspec@18c5a7d 2019-04-27 18:53:20 +02:00
Nobuyoshi Nakada 18eb9e5855
Use an exclusive range for ruby_version_is 2019-04-23 15:13:36 +09:00
Takashi Kokubun 4cd67a848a
Fix RUBY_REVISION spec
broken by 5da52d1210
2019-04-22 22:00:48 +09:00
nobu 1686c0d470 Add `Time#floor`
[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
2019-04-20 05:00:43 +00:00
nobu 3ee0648dc7 io.c: warn non-nil $,
* 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
2019-04-18 21:56:55 +00:00
nobu b86d87c81a Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-18 09:56:03 +00:00
marcandre 816c5323fe OpenStruct: improve error message when passing wrong number of arguments.
Patch by Lisa Ugray (issue #15515)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 13:47:24 +00:00